# Provide a set of functions as a named list to features.
library(tsibble)
tourism %>%
features(Trips, features = list(mean = mean, sd = sd))
# Search and use useful features with `feature_set()`.
if (FALSE) { # requireNamespace("feasts", quietly = TRUE)
library(feasts)
}
tourism %>%
features(Trips, features = feature_set(tags = "autocorrelation"))
# Best practice is to use anonymous functions for additional arguments
tourism %>%
features(Trips, list(~ quantile(., probs=seq(0,1,by=0.2))))
Run the code above in your browser using DataLab