Skip to contents

filter_period() filters rows from a table which has one date column, where the dates are in the time range within the time_window.

Usage

filter_period(tbl, time_window)

Arguments

tbl

Variable time series table, were one column is of type date and all other columns are numeric values

time_window

Vector of length 2 which provides the start and end dates of the time window to be filtered. Must be in any format such as c(2000, 2010), or c(20000101, 20101231), or e.g. c('2000-01-01', '2010-12-31')

Value

The table tbl with the filtered rows based on the time_window.

Examples

if (FALSE) {
flow_sim <- filter_period(tbl = flow_sim, time_window = c(2010, 2015))
}