tframed {tframe}R Documentation

Construct a Tframed Object

Description

Both functions construct a tframed object. These are generic functions. If tf is not a tframe object but has the necessary information then the default methods attempt to build a tframe.

Usage

    tframed(x, tf=NULL, names = NULL)
    tframed(x, tf = NULL, names = NULL)

    is.tframed(x)
    is.Ttframed(x)

Arguments

x a tframed object or an object to be tframed.
tf a tframe.
names optional vector of strings to specify new series names.

Details

This tframedconstructor is like ts but enables the tframe library's generic methods for handling time. is.tframed returns TRUE if a tframe() can extract a tframe from the object. This is true for many objects which are not truly tframed (like ts objects), since tframe() tries fairly hard to build a tframe for the object. is.Ttframed returns TRUE only if the object is truly tframed (i.e. has an attribute tframe).

Value

A tframed object.

See Also

tframe

Examples

    z <- tframed(matrix(rnorm(200), 100,2), 
            tf=list(start=c(1982,1), frequency=12))
    is.tframed(z)

[Package Contents]