amf_parse_basename {amerifluxr} | R Documentation |
Parse BASE data variable name and qualifier
Description
This function parse variable names and qualifiers of AmeriFlux BASE data product. See AmeriFlux web page https://ameriflux.lbl.gov/data/aboutdata/data-variables/ about the details of variable naming and qualifiers.
Usage
amf_parse_basename(var_name, FP_ls = NULL, gapfill_postfix = "_PI_F")
Arguments
var_name |
A vector of variable names (character) to be parsed |
FP_ls |
A vector of standard variable names. If not specified,
use |
gapfill_postfix |
A scalar of expected suffix (character) appended to a variable that is gap-filled. The default is "_PI_F". |
Value
A data frame containing the parsed results for all variables in
var_name
:
variable_name - original variable name
basename - associated basename, w/o qualifier
qualifier_gf - qualifier associated with gap-filling
qualifier_pi - qualifier associated with PI version, excluding gap-filling
qualifier_pos - qualifier associated with position
qualifier_ag - qualifier associated with layer-aggregation, e.g., _N, _SD
layer_index - layer index provided, if any
H_index - H index provided, if any
V_index - V index provided, if any
R_index - R index provided, if any
is_correct_basename - is the parsed basename recognized in FP-Standard
is_pi_provide - is this a PI provided variable e.g., _PI
is_gapfill - is this a gap-filled variable, _PF_F or _F
is_fetch - is this a fetch quantile variable, e.g., FETCH_70...
is_layer_aggregated - is this a layer-integrated variable, i.e., _#
is_layer_SD - is this a standard deviation of layer-integrated variable, i.e., spatial variability
is_layer_number - is this a number of samples of layer-integrated variable, i.e., spatial variability
is_replicate_aggregated - is this a replicate-averaged variable, e.g., _1_1_A
is_replicate_SD - is this a standard deviation of replicate-averaged variable, e.g., _1_1_A_SD
is_replicate_number - is this a number of samples of replicate-averaged variable, e.g., _1_1_A_N
is_quadruplet - is this a quadruplet, e.g., _1_1_1
See Also
Examples
## Not run:
# 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)
# parse variable names/qualifiers
basename_decode <- amf_parse_basename(var_name = colnames(base))
## End(Not run)