read_otn_deployments: Read data from a OTN deployment file

View source: R/load-read_otn_deployments.R

read_otn_deploymentsR Documentation

Read data from a OTN deployment file

Description

Read data from a standard OTN deployment (csv) file and return a data.frame of class glatos_receivers.

Usage

read_otn_deployments(
  deployment_file,
  deploy_date_col = "deploy_date",
  recovery_date_col = "recovery_date",
  last_download_col = "last_download"
)

Arguments

deployment_file

A character string with path and name of deployment file in OTN deployment format (*.csv). If only file name is given, then the file must be located in the working directory.

deploy_date_col

A character string representing the column name containing deploy_date data. Defaults to "deploy_date".

recovery_date_col

A character string representing the column name containing recovery_date. Defaults to "recovery_date."

last_download_col

A character string representing the column name containing the last_download date. Defaults to "last_download."

Details

Data are loaded using data.table::fread() package and timestamps are coerced to POSIXct using lubridate::fast_strptime(). All times must be in UTC timezone per GLATOS standard.

Column names are changed to match GLATOS standard columns when possible. Otherwise, OTN columns and column names are retained.

Value

A data.frame of class glatos_receivers that includes OTN columns that do not map directly to GLATOS columns.

Author(s)

A. Nunes, anunes@dal.ca

Examples

## Not run: 
# get path to example deployments file
deployment_file <- system.file("extdata", "hfx_deployments.csv",
  package = "glatos"
)
dep <- read_otn_deployments(deployment_file)

## End(Not run)


ocean-tracking-network/glatos documentation built on April 17, 2025, 10:38 p.m.