Description Usage Arguments Value Examples
View source: R/sccwrpwbe_functions.R
Takes in df or ts object, start, and end date range and returns df filtered to observations in that time period. Additionally, can take in weekday argument and will only return observations occurring on that weekday. Also will work with abbreviated weekday such as 'Tue'. Function is also pipe compatible with Tidy Verse
1 |
data |
df or time series with Date column |
start |
Character data type expressing date of form 'YYYY-MM-DD' |
end |
Character data type of form 'YYYY-MM-DD' |
weekday |
Character name of weekday e.g. 'Tuesday' or 'Tue' |
Returns df filtered to date range defined by inputs
1 2 3 4 5 6 7 8 | #Example For All Days
Hyperion %>% date_range(start='2020-04-20', end = '2020-07-11')
#Example for selecting a weekday only
Hyperion %>% date_range(start='2020-04-20', end = '2020-07-11', weekday='Tuesday')
#Example with abbreviated day
Hyperion %>% date_range(start='2020-04-20', end = '2020-07-11', weekday='Tue')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.