subset_by_date_range: Subset a data frame by a date range

Description Usage Arguments Examples

View source: R/manipulate.R

Description

Enables the user to subset a data.frame by a specific date range.

Usage

1
2
3
4
5
6
7
subset_by_date_range(
  x,
  range = NULL,
  from = NULL,
  to = NULL,
  date_col = "date"
)

Arguments

x

data.frame

range

A vector of length 2

from, to

A character or Date object to use as upper/lower bound for the subsetting

date_col

Just in case the date column is named something else other than 'date'

Examples

1
2
data(wdqs_usage)
subset_by_date_range(wdqs_usage, from = "2017-01-01", to = "2017-01-31")

wikimedia/wikimedia-discovery-polloi documentation built on Dec. 4, 2019, 2:12 p.m.