objectHistory-class {portfolio}R Documentation

Class "objectHistory"

Description

An object containing a time series of other objects, as a list.

Objects from the Class

Objects can be created by calls of the form new("objectHistory", ...).

Slots

freq:
Object of class "numeric" containing the frequency of the time series of added objects, as periods per year. Defaults to 1.
data:
Object of class "list" containing list of objects in the history. The names of this list are the objects' time periods.

Methods

add
signature(object = "objectHistory", x = "ANY"): add an object of any class to the history object.
length
signature(x = "objectHistory"): return the number of periods.
show
signature(object = "objectHistory"): show the object, briefly.

Author(s)

Jeff Enos jeff@kanecap.com

Examples

x <- new("objectHistory")
x <- add(x, 1, "2005-01-01")
x <- add(x, 2, "2005-01-02")
length(x)

[Package portfolio version 0.2-2 Index]