fts {fts}R Documentation

Fts: a fast timeseries library

Description

create an fts object by specifying dates and data

Usage

fts(data, dates)
## S3 method for class 'fts'
dates(x)
## S3 replacement method for class 'fts'
dates(x) <- value

Arguments

data

a matrix, dataframe, or vector

dates

a vector of dates (default format is POSIXct)

x

an fts object

value

a vector of POSIXct dates

...

further arguments to function

Details

fts is an S3 class in which the fts object is represented as a native R matrix and the dates are attached as an attribute to the matrix

Value

a fts object

Author(s)

Whit Armstrong

See Also

as.fts

Examples

x <- fts()
y <- fts(data=1:100)
z <- fts(dates=seq.POSIXt(from=as.POSIXct(Sys.time()),by="months",length.out=12))

xx <- x[1:10,]

## intersection of dates is taken for Arith methods
xyp <- x + y
xys <- x - y
xym <- x * y
xyd <- x / y
xyg <- x > y
xyl <- x < y

cxy <- cbind(x,y)
rxy <- rbind(x,y)
print(x)
plot(x)

[Package fts version 0.7.7 Index]