This function compiles Dissolved Oxygen data files downloaded from PME miniDot DO loggers. Use if the data where not compiled using the PME java app on the logger.
minidot_cat(folderpath, savetofolder, local_tz = Sys.timezone(location = TRUE))
The folder where the individual files are located
The folder where the output csv is to be saved
Local time zone used for converting from UTC time zone.
Default is Sys.timezone(location = TRUE).
In ouput folder a CSV file
Original function (compile_do_folder) written by Tim Martin.
https://github.com/mnsentinellakes/mnsentinellakes/blob/master/R/compile_do_folder.R
Edits:
* Renamed function
* Added local_tz as a parameter.
* Replaced lubridate::use_tz with as.POSIXct.
* Added serial number as column.
* Swaped order of operations so fail condition is triggered it happens before any work is done.
* Added working example with data.
# Data
dn_input <- file.path(system.file("extdata", package = "ContDataQC")
, "minidot")
dn_export <- tempdir()
# Function
minidot_cat(folderpath = dn_input, savetofolder = dn_export)