powered by
group(..., na.rm = FALSE)
library(dplyr) mutate(iris, g = group(Species)) mutate(iris, g = group(Species, floor(Sepal.Width)), na.rm = TRUE)
Run the code above in your browser using DataLab