units {FLCore}R Documentation

units attribute for FLQuant objects

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-class, FLPar-class, FLCohort-class

Examples

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')

[Package FLCore version 2.2 Index]