Learn R Programming

fts (version 0.9.9.2)

pad: pad and trim dates

Description

add dates to an Fts object by padding w/ additional dates or remove dates from an Fts object by trimming dates

Usage

pad(x, pad.dates)
trim(x, trim.dates)
filter.min.obs(x, obs.required)

Arguments

x

An Fts object

pad.dates

a vector of dates.

trim.dates

a vector of dates.

obs.required

number of required observations per row.

Value

an fts object

Examples

Run this code
# NOT RUN {
x <- fts(index=seq(from=Sys.Date(),by="days",length.out=5),data=1:5)
pad.dates <- index(x)[1] + c(10L,20L)
pad(x,pad.dates)

trim.dts <- index(x)[c(1,3)]

trim(x,trim.dts)
# }

Run the code above in your browser using DataLab