Description Usage Arguments Value See Also Examples
View source: R/amf_read_base.R
This function read in the BASE data file downloaded
from AmeriFlux. See AmeriFlux web page
https://ameriflux.lbl.gov/data/data-processing-pipelines/base-publish/
for details about BASE data product. Use amf_variables
to get a list of standard variable names and units.
1 | amf_read_base(file, unzip = TRUE, parse_timestamp = FALSE)
|
file |
A BASE data file, either in a zipped file or a comma-separate value (csv) file |
unzip |
Logical, whether to unzip. The default is TRUE. Set FALSE if reading from a previously unzipped csv file. |
parse_timestamp |
Logical, whether to parse the time stamp. Set TRUE to parse and add timekeeping columns. |
A data frame containing data. See AmeriFlux website
https://ameriflux.lbl.gov/data/aboutdata/data-variables/
for details about file format, variable definition, units, and convention.
If parse_timestamp
= TRUE, the following six time-keeping columns are
added in the returned data frame:
YEAR - Year (YYYY)
MONTH - Month (MM)
DAY - Day of the month (DD)
DOY - Day of the year (DDD)
HOUR - Hour of the day (HH), based on the middle time of the interval
MINUTE - Minute of the hour (mm), based on the middle time of the interval
TIMESTAMP - An object of class "POSIXlt" in the UTC time zone, based on the middle time of the interval
amf_parse_basename
, amf_filter_base
1 2 3 4 5 6 7 8 9 10 11 12 13 | # read the BASE from a zip file, using the example data file
base <- amf_read_base(file = system.file("extdata",
"AMF_US-CRT_BASE-BADM_2-5.zip",
package = "amerifluxr"),
unzip = TRUE,
parse_timestamp = TRUE)
# read the BASE from a csv file
base <- amf_read_base(file = system.file("extdata",
"AMF_US-CRT_BASE_HH_2-5.csv",
package = "amerifluxr"),
unzip = FALSE,
parse_timestamp = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.