From 9738f34dc944d636220156b476706397a7408e40 Mon Sep 17 00:00:00 2001 From: Sara Carioscia Date: Wed, 23 Aug 2023 07:41:39 -0600 Subject: [PATCH] Update slice.R (#6876) * Update slice.R switched highest/lowest for slice_min and slice_max to improve clarity * Use smallest/largest --------- Co-authored-by: Davis Vaughan --- R/slice.R | 4 ++-- man/slice.Rd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/slice.R b/R/slice.R index 8546bdaa0c..3c259213fb 100644 --- a/R/slice.R +++ b/R/slice.R @@ -7,8 +7,8 @@ #' #' * `slice_head()` and `slice_tail()` select the first or last rows. #' * `slice_sample()` randomly selects rows. -#' * `slice_min()` and `slice_max()` select rows with highest or lowest values -#' of a variable. +#' * `slice_min()` and `slice_max()` select rows with the smallest or largest +#' values of a variable. #' #' If `.data` is a [grouped_df], the operation will be performed on each group, #' so that (e.g.) `slice_head(df, n = 5)` will select the first five rows in diff --git a/man/slice.Rd b/man/slice.Rd index 727f5b864c..89a54c74d5 100644 --- a/man/slice.Rd +++ b/man/slice.Rd @@ -111,8 +111,8 @@ helpers for common use cases: \itemize{ \item \code{slice_head()} and \code{slice_tail()} select the first or last rows. \item \code{slice_sample()} randomly selects rows. -\item \code{slice_min()} and \code{slice_max()} select rows with highest or lowest values -of a variable. +\item \code{slice_min()} and \code{slice_max()} select rows with the smallest or largest +values of a variable. } If \code{.data} is a \link{grouped_df}, the operation will be performed on each group,