Get and Set Unit Names of a 'timeSeries'

Share:

Description

Gets and sets the column names of a 'timeSeries' object. The column names are also called units or unit names.

Usage

1
2
getUnits(x)         
setUnits(x) <- value

Arguments

x

a 'timeSeries' object.

value

a vector of unit names.

See Also

timeSeries()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## A Dummy timeSeries Object
   tS <- dummySeries()
   tS

## Get the Units - 
   getUnits(tS)

## Assign New Units to the Series - 
   setUnits(tS) <- c("A", "B")
   head(tS)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.