# NOT RUN {
data("airquality")
airquality %>%
filtar(~Month > 4) %>%
mutar(meanWind ~ mean(Wind), by = "Month") %>%
sumar(meanWind ~ mean(Wind), by = "Month") %>%
extract("meanWind")
airquality %>%
sumar(
.n ~ mean(.n) | c("Wind", "Temp"),
by = "Month"
)
# Enable data.tables reference semantics with:
withReference({
x <- data.table::data.table(x = 1)
mutar(x, y ~ 2)
})
# }
# NOT RUN {
# Use dplyr as back-end:
options(dat.use.dplyr = TRUE)
x <- data.frame(x = 1)
mutar(x, y ~ dplyr::n())
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab