read_deployment_log: Extract information from deployment log

View source: R/read_deployment_log.R

read_deployment_logR Documentation

Extract information from deployment log

Description

Extract information from deployment log

Usage

read_deployment_log(path.log)

Arguments

path.log

File path to the Log folder.

Details

The log must be saved in a folder called Log in .csv, .xlsx or .xls format, and must include the following columns:

Deployment_Waterbody: waterbody where string was deployed

Location_Description: the station name

Lease#: If located on an aquaculture site, the lease number (NA otherwise)

Deployment: The deployment date, in the order "Ymd"

Retrieval: The retrieval date, in the order "Ymd"

Logger_Latitude: The latitude at which the string was deployed

Logger_Longitude The longitude at which the string was deployed

Logger_Model The type of sensor; see below for options

Serial# The sensor serial number

Sensor_Depth: Depth at which the sensor was deployed

All other columns will be ignored.

Entries in the Logger_Model column can be "HOBO Pro V2", "HOBO DO", "TidbiT MX2303", "TidbiT MX2203" "aquaMeasure DOT", "aquaMeasure SAL", "aquaMeasure SST", or "VR2AR". (Some mis-spellings are accepted: "HOBO pro V2", "HOBO_Pro_V2", "aquameasure DOT", "aquameasure SAL", "aquameasure SST")

A Warning message is printed to the console when the function does not recognize a sensor in the log.

A message is printed to the console when Hobo, aquaMeasure, or Vemco sensors are not found in the log.

A message will be printed to the console if there is more than one unique entry in Deployment_Waterbody, Location_Description, Deployment, Retrieval, Logger_Latitude, or Logger_Longitude.

If there is more than one eligible file (csv, .xlsx or .xls) in the Log folder, the function will stop with an error.

Value

Returns a list with 5 elements. deployment.dates is a dataframe with two columns: start.date (the date of deployment) and end.date (date of retrieval). area.info is a dataframe with five columns: waterbody, latitude, longitude, station, and lease. HOBO, aM, and vemco are each a dataframe with two columns: SENSOR (serial number) and the corresponding DEPTH (depth of deployment in m).

Author(s)

Danielle Dempsey

See Also

Other compile: compile_HOBO_data(), compile_all_data(), compile_aquaMeasure_data(), compile_vemco_data()

Examples

# path to "Log" folder
path <- system.file("extdata", package = "strings")

log <- read_deployment_log(path)
# deployment and retrieval dates
dates <- log$deployment.dates
# deployment location information
location <- log$area.info
# serial number(s) and depth(s) of deployment for Hobo and TidiT sensors on the string
serial.table.HOBO <- log$HOBO
# serial number(s) and depth(s) of deployment for aquaMeasure sensors on the string
serial.table.aM <- log$aM
# depth of the vemco sensor
depth.vemco <- log$vemco

Centre-for-Marine-Applied-Research/strings documentation built on Aug. 21, 2023, 8 a.m.