as.fts: Convert from/to fts

Description Usage Arguments Details Value Author(s) Examples

Description

convert an object into an fts and vice versa

Usage

1
as.fts(x)

Arguments

x

an R matrix or data.frame

Details

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

Value

an Fts object

Author(s)

Whit Armstrong

Examples

1
2
3
4
5
6
N <- 100
xm <- matrix(rnorm(N))
dts <- format(seq(from=Sys.Date(),length.out=N,by="days"),"%Y-%m-%d")
rownames(xm) <- dts
x.from.m <- as.fts(xm)
x.from.df <- as.fts(data.frame(asofdate=dts,my.data=xm))

Example output

Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

fts documentation built on May 2, 2019, 9:17 a.m.

Related to as.fts in fts...