View source: R/EventFiltering.R
EventFiltering | R Documentation |
Filters Events in Data
EventFiltering(EventNameorValue,EventArrayOrEvent,Silent=FALSE)
EventNameorValue |
Character or value to search for |
EventArrayOrEvent |
[1:n,1:d] Array (character or numerical matrix) or vector of string or values where the event has to be searched in, list cannot be interpreted, dataframes are converted to matrices |
Silent |
If TRUE, error warnings regarding events disabled. Default FALSE |
[1:n] Numerical Vector with ones and zeros, ones indicate found events
Michael Thrun
data(YearlyInterestRatesData)
# Filter all events, with value 22.000
res = EventFiltering(22.000, as.matrix(YearlyInterestRates))
# Indices with one values are indicative of found events in this entry/row of event vector/matrix
print(res)
# Data filtered for events
filteredEvents = YearlyInterestRates[which(res == 1),]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.