From 8d96145aa11d4eabf9b66fa391b57f8cc467a740 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Tue, 6 Aug 2024 21:53:38 +0200 Subject: [PATCH] Update `seq_linter()` docs (#2644) --- R/seq_linter.R | 3 ++- man/seq_linter.Rd | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/R/seq_linter.R b/R/seq_linter.R index decc02c66..d31b3dd08 100644 --- a/R/seq_linter.R +++ b/R/seq_linter.R @@ -7,7 +7,8 @@ #' Additionally, it checks for `1:n()` (from `{dplyr}`) and `1:.N` (from `{data.table}`). #' #' These often cause bugs when the right-hand side is zero. -#' It is safer to use [base::seq_len()] or [base::seq_along()] instead. +#' Instead, it is safer to use [base::seq_len()] (to create a sequence of a specified *length*) or +#' [base::seq_along()] (to create a sequence *along* an object). #' #' @examples #' # will produce lints diff --git a/man/seq_linter.Rd b/man/seq_linter.Rd index 02c46af72..ece1e853c 100644 --- a/man/seq_linter.Rd +++ b/man/seq_linter.Rd @@ -15,7 +15,8 @@ conjunction with \code{seq()} (e.g., \code{seq(length(...))}, \code{seq(nrow(... Additionally, it checks for \code{1:n()} (from \code{{dplyr}}) and \code{1:.N} (from \code{{data.table}}). These often cause bugs when the right-hand side is zero. -It is safer to use \code{\link[base:seq]{base::seq_len()}} or \code{\link[base:seq]{base::seq_along()}} instead. +Instead, it is safer to use \code{\link[base:seq]{base::seq_len()}} (to create a sequence of a specified \emph{length}) or +\code{\link[base:seq]{base::seq_along()}} (to create a sequence \emph{along} an object). } \examples{ # will produce lints