diff --git a/R/data_arrange.R b/R/data_arrange.R index 75739e3d1..d725eaa4e 100644 --- a/R/data_arrange.R +++ b/R/data_arrange.R @@ -24,6 +24,9 @@ #' # Arrange in decreasing order #' data_arrange(head(mtcars), "-carb") #' +#' # arrange several variables, grouped by another one +#' data_arrange(head(mtcars), c("gear", "carb"), by = "cyl") +#' #' # Throw an error if one of the variables specified doesn't exist #' try(data_arrange(head(mtcars), c("gear", "foo"), safe = FALSE)) #' @export diff --git a/man/data_arrange.Rd b/man/data_arrange.Rd index bd876b30e..414533659 100644 --- a/man/data_arrange.Rd +++ b/man/data_arrange.Rd @@ -40,6 +40,9 @@ data_arrange(head(mtcars), c("gear", "carb")) # Arrange in decreasing order data_arrange(head(mtcars), "-carb") +# arrange several variables, grouped by another one +data_arrange(head(mtcars), c("gear", "carb"), by = "cyl") + # Throw an error if one of the variables specified doesn't exist try(data_arrange(head(mtcars), c("gear", "foo"), safe = FALSE)) }