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))

Arguments

folderpath

The folder where the individual files are located

savetofolder

The folder where the output csv is to be saved

local_tz

Local time zone used for converting from UTC time zone.

Default is Sys.timezone(location = TRUE).

Value

In ouput folder a CSV file

Details

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.

Examples

# Data
dn_input <- file.path(system.file("extdata", package = "ContDataQC")
                      , "minidot")
dn_export <- tempdir()

# Function
minidot_cat(folderpath = dn_input, savetofolder = dn_export)