View source: R/compile_Vemco_data.R
compile_vemco_data | R Documentation |
This function formats data from a Vemco deployment so it can be compiled with the HOBO and aquaMeasure data.
compile_vemco_data(
path.vemco,
area.name = "",
depth.vemco,
deployment.range,
trim = TRUE,
export.csv = FALSE
)
path.vemco |
File path to the Vemco folder. This folder should have one .csv or .xlsx file that was extracted using Vue software. Other file types in the folder will be ignored. |
area.name |
Area where the sensor was deployed. |
depth.vemco |
Character string indicating the depth at which the Vemco was deployed, in the format "10m". |
deployment.range |
A dataframe with two columns. The first column holds the deployment date (a Date object, POSIXct object, or character string in the order year, month, day), and the second column holds the retrieval date (a Date object, POSIXct object, or character string in the order year, month, day). |
trim |
Logical value indicating whether to trim the data to the dates
specified in |
export.csv |
Logical value indicating whether to export the compiled
data as a .csv file. If |
The raw Vemco data must be saved in a folder named Vemco in .csv or .xlsx format.
All columns are read in as class character to ensure the timestamp is parsed correctly. Timestamp must be saved in excel as a number or a character in the order "ymd IMS p", "Ymd IMS p", "Ymd HM", "Ymd HMS", "dmY HM", or "dmY HMS".
If there are "Temperature" entries in the Description column, these will be extracted and compiled. If there are no "Temperature" entries, but there are "Average temperature" entries, these will be extracted and compiled. Otherwise, the function will stop with an error message.
Returns a dataframe or exports a spreadsheet with the formatted Vemco data in two columns: the timestamp (in the format "Y-m-d H:M:S") and temperature value (degree celsius, rounded to three decimal places). Metadata at the top of each column indicates the deployment and retrieval dates, the sensor serial number, the depth of the sensor, and the timezone of the timestamp.
To include the metadata, all values were converted to class
character
. To manipulate the data, the values must be converted to
the appropriate class (e.g., POSIXct
for the timestamps and
numeric
for temperature values). This can be done using the function
convert_to_tidydata()
.
Danielle Dempsey
Other compile:
compile_HOBO_data()
,
compile_all_data()
,
compile_aquaMeasure_data()
,
read_deployment_log()
# path to "Vemco" folder
path <- system.file("extdata", package = "strings")
# depth at which sensor was deployed
depth <- "15m"
# deployment and retrieval dates
deployment <- data.frame("START" = "2019-05-30", "END" = "2019-10-19")
vemco_data <- compile_vemco_data(path.vemco = path,
depth.vemco = depth,
deployment.range = deployment)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.