fts (version 0.7.5)

as.fts: Convert from/to fts

Description

convert an object into an fts and vice versa

Usage

as.fts(x)

Arguments

x
an R matrix or data.frame

Value

  • an Fts object

Details

converts a rectanular object into an Fts object must be able to convert rownames into some form of dates

Examples

Run this code
N <- 100
xm <- matrix(rnorm(N))
dts <- format(seq(from=Sys.time(),length.out=N,by="DSTday"),"%Y-%m-%d")
rownames(xm) <- dts
x.from.m <- as.fts(xm)
x.from.df <- as.fts(as.data.frame(xm))

Run the code above in your browser using DataCamp Workspace