filter_duplicates | R Documentation |
filter_duplicates
filter_duplicates(x, fun = data.table::first, ...)
x |
data.table with time and value columns |
fun |
first, last, mean, median |
... |
arguments to pass to fun |
x <- data.table(datetime = sample(1:1000, 10000, replace = TRUE))
x[, value := rnorm(nrow(x))]
setkey(x, datetime)
system.time(filter_duplicates(x, mean))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.