From 78960916715ccf9ea1ed6bc9d03c5a7ef5689fe1 Mon Sep 17 00:00:00 2001 From: Leonidas Zhak <70497898+LeonidasZhak@users.noreply.github.com> Date: Sun, 7 Jun 2026 19:29:49 +0800 Subject: [PATCH] docs: fix bare infinitive 'allows to' in rleid.Rd and data.table.Rd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix two instances of the bare infinitive grammatical error 'allows to' in data.table documentation: - rleid.Rd: 'allows to generate' → 'allows generating' - data.table.Rd: 'allows to not just select' → 'allows not just selecting' The verb 'allow' requires a gerund (allow + -ing) or a noun phrase before 'to' (allow + someone + to). 'Allows to generate' and 'allows to not just select' are bare infinitive errors. These follow the same pattern as the frollapply.Rd fix in PR #7784. --- man/data.table.Rd | 2 +- man/rleid.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/man/data.table.Rd b/man/data.table.Rd index 898f698369..2fa911ef84 100644 --- a/man/data.table.Rd +++ b/man/data.table.Rd @@ -81,7 +81,7 @@ data.table(\dots, keep.rownames=FALSE, check.names=FALSE, key=NULL, stringsAsFac \emph{Advanced:} When \code{i} is a single variable name, it is not considered an expression of column names and is instead evaluated in calling scope. } - \item{j}{When \code{with=TRUE} (default), \code{j} is evaluated within the frame of the data.table; i.e., it sees column names as if they are variables. This allows to not just \emph{select} columns in \code{j}, but also \code{compute} on them e.g., \code{x[, a]} and \code{x[, sum(a)]} returns \code{x$a} and \code{sum(x$a)} as a vector respectively. \code{x[, .(a, b)]} and \code{x[, .(sa=sum(a), sb=sum(b))]} returns a two column data.table each, the first simply \emph{selecting} columns \code{a, b} and the second \emph{computing} their sums. + \item{j}{When \code{with=TRUE} (default), \code{j} is evaluated within the frame of the data.table; i.e., it sees column names as if they are variables. This allows not just \emph{selecting} columns in \code{j}, but also \emph{computing} on them e.g., \code{x[, a]} and \code{x[, sum(a)]} returns \code{x$a} and \code{sum(x$a)} as a vector respectively. \code{x[, .(a, b)]} and \code{x[, .(sa=sum(a), sb=sum(b))]} returns a two column data.table each, the first simply \emph{selecting} columns \code{a, b} and the second \emph{computing} their sums. As long as \code{j} returns a \code{list}, each element of the list becomes a column in the resulting \code{data.table}. When the output of \code{j} is not a \code{list}, the output is returned as-is (e.g. \code{x[ , a]} returns the column vector \code{a}), unless \code{by} is used, in which case it is implicitly wrapped in \code{list} for convenience (e.g. \code{x[ , sum(a), by=b]} will create a column named \code{V1} with value \code{sum(a)} for each group). diff --git a/man/rleid.Rd b/man/rleid.Rd index 837d4c4ea4..96e3319e9a 100644 --- a/man/rleid.Rd +++ b/man/rleid.Rd @@ -16,7 +16,7 @@ rleidv(x, cols=seq_along(x), prefix=NULL) \item{prefix}{ Either \code{NULL} (default) or a character vector of length=1 which is prefixed to the row ids, returning a character vector (instead of an integer vector).} } \details{ - At times aggregation (or grouping) operations need to be performed where consecutive runs of identical values should belong to the same group (See \code{\link[base]{rle}}). The use for such a function has come up repeatedly on StackOverflow, see the \code{See Also} section. This function allows to generate "run-length" groups directly. + At times aggregation (or grouping) operations need to be performed where consecutive runs of identical values should belong to the same group (See \code{\link[base]{rle}}). The use for such a function has come up repeatedly on StackOverflow, see the \code{See Also} section. This function allows generating "run-length" groups directly. \code{rleid} is designed for interactive use and accepts a sequence of vectors as arguments. For programming, \code{rleidv} might be more useful. }