subset_span | R Documentation |
Take a Date
, POSIXct
, or POSIXlt
vector and subset it by
a pattern of date and/or time parts.
subset_span(spanned, pattern_list)
spanned |
A vector of class |
pattern_list |
A list with the desired pattern for each of the following datetime parts: year, mon, mday, wday, hour, min, sec. |
For subsetting weekdays, they run from 0 (Sunday) to 6 (Saturday).
Vector of the same class as spanned
, containing all the data points in
spanned
that meets the requirements in pattern_list
.
date_span <- span_date(20170701, len_out = 100) subset_span(date_span, list(wday = 1:5)) time_span <- span_time("20170101 00", 201702) subset_span(time_span, list(hour = 7:17)) subset_span(time_span, list(hour = c(10, 16), mday = seq(5, 30, 5)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.