diff --git a/R/data_summary.R b/R/data_summary.R index 7662d0c94..546c47659 100644 --- a/R/data_summary.R +++ b/R/data_summary.R @@ -5,9 +5,9 @@ #' data frame or a matrix. #' #' @param x A (grouped) data frame. -#' @param by Optional character string, indicating the name of a variable in `x`. -#' If supplied, the data will be split by this variable and summary statistics -#' will be computed for each group. +#' @param by Optional character string, indicating the names of one or more +#' variables in the data frame. If supplied, the data will be split by these +#' variables and summary statistics will be computed for each group. #' @param remove_na Logical. If `TRUE`, missing values are omitted from the #' grouping variable. If `FALSE` (default), missing values are included as a #' level in the grouping variable. diff --git a/man/data_summary.Rd b/man/data_summary.Rd index 24cfa1a9f..82d154175 100644 --- a/man/data_summary.Rd +++ b/man/data_summary.Rd @@ -18,9 +18,9 @@ and the function to compute the summary statistic. Example: as a character string, e.g. \code{"mean_sepal_width = mean(Sepal.Width)"}. The summary function \code{n()} can be used to count the number of observations.} -\item{by}{Optional character string, indicating the name of a variable in \code{x}. -If supplied, the data will be split by this variable and summary statistics -will be computed for each group.} +\item{by}{Optional character string, indicating the names of one or more +variables in the data frame. If supplied, the data will be split by these +variables and summary statistics will be computed for each group.} \item{remove_na}{Logical. If \code{TRUE}, missing values are omitted from the grouping variable. If \code{FALSE} (default), missing values are included as a