readOutputUnits: Reads variable units

View source: R/readOutputUnits.R

readOutputUnitsR Documentation

Reads variable units

Description

Gets units for all variables in a specified CRHM output file. If the file is the new CRHM format, then the units are read directly from the second line of the file. If the file is in the older CRHM format, then units are found by matching the variables to those in the internal data frame CRHM_vars.

Usage

readOutputUnits(outputFile, quiet = TRUE)

Arguments

outputFile

Required. A CRHM output file.

quiet

Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave quiet=TRUE (i.e. the default). If you are working interactively, you will probably want to set quiet = FALSE.

Value

If successful, returns a CRHMr data frame containing the name of each variable and its units. If unsuccessful, returns the value FALSE.

Author(s)

Kevin Shook

See Also

readOutputFile

Examples

## Not run: 
units <- readOutputFile('CRHM_output_1.txt')
## End(Not run)

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.