fts

0th

Percentile

Fts: a fast timeseries library

create an fts object by specifying dates and data

Keywords
ts
Usage
fts(data, dates)

## S3 method for class 'fts': head(x, n = 10,\dots) ## S3 method for class 'fts': tail(x, n = 10,\dots) ## S3 method for class 'fts': dates(x) ## S3 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
n
an integer specifying the number of rows
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

See Also

as.fts

Aliases
  • fts
  • Ops.fts
  • [.fts
  • [<-.fts
  • dates
  • dates<-
  • dates.fts
  • dates<-.fts
  • cbind.fts
  • rbind.fts
  • head.fts
  • tail.fts
  • print.fts
  • plot.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

head(x,5)
tail(y,10)
cxy <- cbind(x,y)
rxy <- rbind(x,y)
print(x)
plot(x)
Documentation reproduced from package fts, version 0.7.5, License: GPL Version 3

Community examples

Looks like there are no examples yet.