read_glatos_receivers: Read data from a GLATOS receiver location file

View source: R/load-read_glatos_receivers.r

read_glatos_receiversR Documentation

Read data from a GLATOS receiver location file

Description

Read data from a standard GLATOS receiver location (csv) file and return a data.frame of class glatos_receivers.

Usage

read_glatos_receivers(rec_file, version = NULL)

Arguments

rec_file

A character string with path and name of receiver location file in standard GLATOS format (*.csv). If only file name is given, then the file must be located in the working directory. File must be a standard GLATOS file (e.g., GLATOS_receiverLocations_yyyymmdd_xxxxxx.csv) obtained from GLATOSWeb Data Portal http://glatos.glos.us.

version

An optional character string with the GLATOS file version number. If NULL (default value) then version will be determined by evaluating file structure. The only allowed values currently are NULL and "1.0". Any other values will trigger an error.

Details

Data are loaded using fread and timestamps are coerced to POSIXct using fastPOSIXct. All timestamps must be 'YYYY-MM-DD HH:MM' format and in UTC timezone per GLATOS standard.

Value

A data.frame of class glatos_receivers.

Author(s)

C. Holbrook (cholbrook@usgs.gov)

Examples

#get path to example receiver_locations file
rec_file <- system.file("extdata", 
  "sample_receivers.csv", package = "glatos")
  
#note that code above is needed to find the example file
#for real glatos data, use something like below
#rec_file <- "c:/path_to_file/GLATOS_receiverLocations_20150321_132242.csv"   

rcv <- read_glatos_receivers(rec_file)


jsta/glatos documentation built on July 11, 2022, 7:01 a.m.