create_variable_definitions: Create variable definitions from a data frame

Description Usage Arguments Value See Also Examples

View source: R/variables.R

Description

Given a data frame as input, create a list of variable definitions usable by the function create_efts_variables to create netCDF variables.

Usage

1

Arguments

dframe

a data frame, one line is one variable definition. Must have at least the following column names: 'name', 'longname', 'units', 'missval', 'precision', 'type', 'type_description', 'location_type'

Value

a list of length equal to the number of rows in the input data frame

See Also

See create_efts for examples

Examples

1
2
3
4
5
6
7
8
9
varsDef = data.frame(name=letters[1:3], stringsAsFactors=FALSE)
varsDef$longname=paste('long name for', varsDef$name)
varsDef$units='mm'
varsDef$missval=-999.0
varsDef$precision='double'
varsDef$type=2
varsDef$type_description='accumulated over the previous time step'
varsDef$location_type='Point'
str(create_variable_definitions(varsDef))

efts documentation built on May 2, 2019, 3:39 p.m.