minidot_cat: Compile DO data

View source: R/fun.miniDOT.cat.R

minidot_catR Documentation

Compile DO data

Description

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.

Usage

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

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 format to avoid loss of time on midnight entries.

* Added serial number as column.

* Swapped order of operations so if fail condition is triggered it happens before any work is done.

* Added working example with data.

Value

In ouput folder a CSV file

Examples

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

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


leppott/ContDataQC documentation built on Jan. 5, 2025, 10:12 a.m.