Learn R Programming

fts (version 0.9.9.2)

event.dates: Extract Dates

Description

Extract the dates from a one column LOGICAL Fts object where value is TRUE

Usage

event.dates(x)

Arguments

x

An Fts object

Value

a vector of dates

Details

removes NA values before extracting dates

Examples

Run this code
# NOT RUN {
x <- fts(index=seq(from=Sys.Date(),by="days",length.out=100),data=rnorm(100))
x.bool <- x > 10
event.dates(x.bool)

## ignores NA's
x.bool[10:20] <- NA
event.dates(x.bool)

# }

Run the code above in your browser using DataLab