ave_dt | R Documentation |
ave
for date objectsReturn date objects when ave
tries to return integers.
ave_dt(x, ..., FUN = identity)
x |
an integer or date vector |
... |
grouping variables, typically factors, all of the same length
as |
FUN |
function to apply for each factor level combination |
ave
set.seed(1)
dt <- Sys.Date() + sample(1:20, 20)
id <- rep(1:4, each = 5)
ave(dt, id, FUN = min)
ave_dt(dt, id, FUN = min)
ave(seq_along(dt), id, FUN = function(ii) dt[ii])
ave_dt(seq_along(dt), id, FUN = function(ii) dt[ii])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.