![]() Head(collap(df1, x1 + x2 ~ year + month, list(fmean, fmin, fmax))) # You can also apply multiple functions to all columns # Customized: Aggregate columns with different functionsĬustom = list(fmean = c("x1", "x2"), fmedian = "x2"))) ![]() Head(collap(df1, x1 + x2 ~ year + month, fmean)) These are now superseded or deprecated in favor of across().įor a more flexible and faster approach to data aggregation, check out the collap function in the collapse R package available on CRAN: library(collapse)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |