timeSeries-slotDocumentation: Get and set optional attributes of a 'timeSeries'

attributesR Documentation

Get and set optional attributes of a 'timeSeries'

Description

Extracts or assigns optional attributes from or to a "timeSeries" object.

Usage

getAttributes(obj)         
setAttributes(obj) <- value

Arguments

obj

a timeSeries object whose optional attributes are to be accessed.

value

an object, the new value of the attribute, or NULL to remove the attribute.

Details

Each timeSeries object is documented. By default a time series object holds in the documentation slot a string with creation time and the user who has defined it. But this is not all. Optionally the whole creation process and history can be recorded. For this the @documentation slot may have an optional "Attributes" element. This attribute is tracked over the whole life time of the object whenever the time series is changed. Whenever you like to be informed about the optional attributes, or you like to recover them you can dot it, and evenmore, whenever you like to add information as an addiitonal attribute you can also do it.

The two functions getAttributes and setAttributes provide access to and allow to modify the optional attributes of a timeSeries object.

Examples


## Create an artificial 'timeSeries' Object - 
   tS <- dummyMonthlySeries()
   tS

## Get Optional Attributes -
   getAttributes(tS)
   tS@documentation
   
## Set a new Optional Attribute -
   setAttributes(tS) <- list(what="A dummy Series")
   tS
   getAttributes(tS)
   tS@documentation

timeSeries documentation built on Sept. 30, 2024, 9:15 a.m.