addLabels: addLabels

Description Usage Arguments Details Author(s) Examples

View source: R/addLabels.R

Description

Given a data.frame, use the 'standard_name' and 'units' attributes of columns in that data.frame to add 'label' attributes that can be used for axis titles in plots.

Usage

1
addLabels(.Data)

Arguments

.Data

A Ranadu-style data.frame containing column vectors of measurements, with attributes. Some subsetting removes these attributes, so it may be necessary to use "transferAttributes()" to preserve them.

Details

Constructs an appropriate label for the variable, combining the "measurand" and "units" attributes, often with translation to descriptive labels that seem more appropriate. plotWAC() uses these label attributes, possibly with translation to expressions where appropriate. Attributes including "standard_name" and "units" should be present for this to work. This function is called by getNetCDF() and getProjectData() when they construct data,franes from netCDF-format files.

Author(s)

William Cooper

Examples

1
addLabels (RAFdata)

NCAR/Ranadu documentation built on July 30, 2019, 11:08 p.m.