addLabels: addLabels

View source: R/addLabels.R

addLabelsR Documentation

addLabels

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

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

addLabels (RAFdata)

NCAR/Ranadu documentation built on Jan. 27, 2023, 1:09 a.m.