From 28e7360dea543e31dea305832791b9223337624a Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 4 Mar 2024 16:04:58 +0100 Subject: [PATCH] update docs --- R/data_summary.R | 6 ++---- man/data_summary.Rd | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/R/data_summary.R b/R/data_summary.R index 8639d25c5..8d15f8483 100644 --- a/R/data_summary.R +++ b/R/data_summary.R @@ -17,8 +17,6 @@ #' 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. #' -#' @seealso `value_at()`, which can be used inside a `data_summary()` call. -#' #' @return A data frame with the requested summary statistics. #' #' @examples @@ -48,8 +46,8 @@ #' # first and last observations of "mpg" within groups #' data_summary( #' mtcars, -#' first = value_at(mpg), -#' last = value_at(mpg, -1), +#' first = mpg[1], +#' last = mpg[length(mpg)], #' by = c("am", "gear") #' ) #' @export diff --git a/man/data_summary.Rd b/man/data_summary.Rd index 2c4408618..ccbf4c524 100644 --- a/man/data_summary.Rd +++ b/man/data_summary.Rd @@ -60,11 +60,8 @@ data_summary(mtcars, observations = n(), by = c("am", "gear")) # first and last observations of "mpg" within groups data_summary( mtcars, - first = value_at(mpg), - last = value_at(mpg, -1), + first = mpg[1], + last = mpg[length(mpg)], by = c("am", "gear") ) } -\seealso{ -\code{value_at()}, which can be used inside a \code{data_summary()} call. -}