From 5760b35b9dfdb6a4c59f27538f4da451eff63ff3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 4 Mar 2024 08:33:33 +0100 Subject: [PATCH] only n() --- R/data_summary.R | 6 ++---- man/data_summary.Rd | 8 ++------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/R/data_summary.R b/R/data_summary.R index 2c9df3e84..654c20879 100644 --- a/R/data_summary.R +++ b/R/data_summary.R @@ -14,10 +14,8 @@ #' @param ... One or more named expressions that define the new variable name #' and the function to compute the summary statistic. Example: #' `mean_sepal_width = mean(Sepal.Width)`. The expression can also be provided -#' as a character string, e.g. `"mean_sepal_width = mean(Sepal.Width)"`. -#' -#' `data_summary()` supports a few special function for summary statistics: -#' - `n()` to count the number of observations. +#' as a character string, e.g. `"mean_sepal_width = mean(Sepal.Width)"`. The +#' summary function `n()` can be used to count the number of observations. #' #' @return A data frame with the requested summary statistics. #' diff --git a/man/data_summary.Rd b/man/data_summary.Rd index 25a4576ea..0db624338 100644 --- a/man/data_summary.Rd +++ b/man/data_summary.Rd @@ -15,12 +15,8 @@ data_summary(x, ...) \item{...}{One or more named expressions that define the new variable name and the function to compute the summary statistic. Example: \code{mean_sepal_width = mean(Sepal.Width)}. The expression can also be provided -as a character string, e.g. \code{"mean_sepal_width = mean(Sepal.Width)"}. - -\code{data_summary()} supports a few special function for summary statistics: -\itemize{ -\item \code{n()} to count the number of observations. -}} +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