units: units attribute for FLQuant objects

Description Generic function Methods Author(s) See Also Examples

Description

Objects of class FLQuant contain an units attribute of class character. This should be used to store the corresponding units of measurement. This attribute can be directly accessed and modified using the units and units<- methods.

For complex objects, units will return a named list containing the attributes of all FLQuant slots. units of a complex object can be modified for all slots or a subset of them, by passing a named list with the new values. See examples below.

Generic function

units(x)

units<-(x,value)

Methods

signature(x=FLQuant) :

Describe method

signature(x=FLComp) :

Describe method

signature(x=FLPar) :

Describe method

signature(x=FLCohort) :

Describe method

Author(s)

The FLR Team

See Also

FLQuant, FLPar, FLCohort

Examples

1
2
3
4
5
6
7
8
9
flq <- FLQuant(rnorm(100), dim=c(5,20), units='kg')
units(flq)
units(flq) <- 't'
summary(flq)

# units for a complex object
data(ple4)
units(ple4)
units(ple4) <- list(harvest='hr')

FLCore documentation built on May 2, 2019, 5:46 p.m.