Skip to content

Commit

Permalink
Merge pull request #71 from r-lib/arg-order
Browse files Browse the repository at this point in the history
Match argument order from roxygen
  • Loading branch information
MichaelChirico authored Oct 14, 2024
2 parents 3ee080c + ff8b327 commit b09e20d
Show file tree
Hide file tree
Showing 17 changed files with 70 additions and 70 deletions.
4 changes: 2 additions & 2 deletions man/as.character.integer64.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
\arguments{
\item{x}{ an integer64 vector }

\item{keep.names}{ FALSE, set to TRUE to keep a names vector }

\item{...}{ further arguments to the \code{\link{NextMethod}} }

\item{keep.names}{ FALSE, set to TRUE to keep a names vector }
}
\value{
\code{as.bitstring} returns a string of class 'bitstring'. \cr
Expand Down
4 changes: 2 additions & 2 deletions man/as.integer64.character.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
\arguments{
\item{x}{ an atomic vector }

\item{keep.names}{ FALSE, set to TRUE to keep a names vector }

\item{...}{ further arguments to the \code{\link{NextMethod}} }

\item{keep.names}{ FALSE, set to TRUE to keep a names vector }
}
\value{
The other methods return atomic vectors of the expected types
Expand Down
8 changes: 4 additions & 4 deletions man/bit64-package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@

\item{x}{ an integer64 vector }

\item{object}{ an integer64 vector }

\item{value}{ an integer64 vector of values to be assigned }

\item{quote}{ logical, indicating whether or not strings should be printed with surrounding quotes. }

\item{vec.len, give.head, give.length}{ see \code{\link[utils]{str}} }

\item{...}{ further arguments to the \code{\link{NextMethod}} }

\item{object}{ an integer64 vector }

\item{vec.len, give.head, give.length}{ see \code{\link[utils]{str}} }
}
\value{
\code{integer64} returns a vector of 'integer64',
Expand Down
4 changes: 2 additions & 2 deletions man/bit64S3.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
integer64 vector: the values to be matched against, optionally carrying a cache created with \code{\link{hashcache}} or \code{\link{sortordercache}}
}

\item{...}{ ignored }

\item{from}{ scalar denoting first element of sequence }

\item{to}{ scalar denoting last element of sequence }

\item{...}{ ignored }
}
\value{
\code{\link{invisible}}
Expand Down
4 changes: 2 additions & 2 deletions man/extract.replace.integer64.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

\item{i}{ indices specifying elements to extract }

\item{value}{ an atomic vector with values to be assigned }

\item{...}{ further arguments to the \code{\link{NextMethod}} }

\item{value}{ an atomic vector with values to be assigned }
}
\value{
A vector or scalar of class 'integer64'
Expand Down
8 changes: 4 additions & 4 deletions man/format.integer64.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@
\arguments{
\item{x}{ an atomic vector of class 'integer64'}

\item{justify}{ should it be right-justified (the default), left-justified, centred or left alone. }

\item{...}{ further arguments to the \code{\link{NextMethod}} }

\item{base}{ an atomic scalar (we save 50\% log-calls by not allowing a vector base) }

\item{digits}{ integer indicating the number of decimal places (round) or significant digits (signif) to be used.
Negative values are allowed (see \code{\link{round}}) }

\item{justify}{ should it be right-justified (the default), left-justified, centred or left alone. }

\item{center}{ see \code{\link{scale}} }

\item{scale}{ see \code{\link{scale}} }

\item{...}{ further arguments to the \code{\link{NextMethod}} }
}
\value{
\code{\link{format}} returns a character vector \cr
Expand Down
8 changes: 4 additions & 4 deletions man/hashcache.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ ordercache(x, has.na = NULL, stable = NULL, optimize = "time")

\item{nunique}{ giving \emph{correct} number of unique elements can help reducing the size of the hashmap }

\item{...}{
passed to \code{\link{hashmap}}
}

\item{has.na}{
boolean scalar defining whether the input vector might contain \code{NA}s. If we know we don't have NAs, this may speed-up.
\emph{Note} that you risk a crash if there are unexpected \code{NA}s with \code{has.na=FALSE}
Expand All @@ -34,10 +38,6 @@ boolean scalar defining whether stable sorting is needed. Allowing non-stable ma
\item{optimize}{
by default ramsort optimizes for 'time' which requires more RAM,
set to 'memory' to minimize RAM requirements and sacrifice speed
}
\item{...}{
passed to \code{\link{hashmap}}
}
}
\value{
Expand Down
8 changes: 4 additions & 4 deletions man/hashmap.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,19 @@ hashmaptab(x, ...)
\arguments{
\item{x}{ an integer64 vector }

\item{...}{ further arguments, passed from generics, ignored in methods }

\item{minfac}{ minimum factor by which the hasmap has more elements compared to the data \code{x}, ignored if \code{hashbits} is given directly }

\item{hashbits}{ length of hashmap is \code{2^hashbits} }

\item{cache}{ an optional \code{\link{cache}} object into which to put the hashmap (by default a new cache is created)}

\item{nunique}{ giving \emph{correct} number of unique elements can help reducing the size of the hashmap }

\item{cache}{ an optional \code{\link{cache}} object into which to put the hashmap (by default a new cache is created)}

\item{nomatch}{ the value to be returned if an element is not found in the hashmap }

\item{keep.order}{ determines order of results and speed: \code{FALSE} (the default) is faster and returns in the (pseudo)random order of the hash function, \code{TRUE} returns in the order of first appearance in the original data, but this requires extra work }

\item{...}{ further arguments, passed from generics, ignored in methods }
}
\value{
see details
Expand Down
4 changes: 2 additions & 2 deletions man/keypos.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ keypos(x, ...)
\arguments{
\item{x}{a vector or a data frame or an array or \code{NULL}.}

\item{...}{ignored}

\item{method}{
NULL for automatic method selection or a suitable low-level method, see details
}

\item{...}{ignored}
}
\value{
an integer vector of the same length as \code{x} containing positions relativ to \code{sort(unique(x), na.last=FALSE)}
Expand Down
4 changes: 2 additions & 2 deletions man/prank.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
\arguments{
\item{x}{a integer64 vector}

\item{...}{ignored}

\item{method}{
NULL for automatic method selection or a suitable low-level method, see details
}

\item{...}{ignored}
}
\value{
\code{prank} returns a numeric vector of the same length as \code{x}.
Expand Down
14 changes: 7 additions & 7 deletions man/qtile.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,16 @@
\arguments{
\item{x}{a integer64 vector}

\item{object}{a integer64 vector}

\item{probs}{
numeric vector of probabilities with values in [0,1] - possibly containing \code{NA}s
}

\item{...}{ignored}

\item{names}{
logical; if \code{TRUE}, the result has a \code{names} attribute. Set to \code{FALSE} for speedup with many probs.
}

\item{type}{
an integer selecting the quantile algorithm, currently only 0 is supported, see details
}

\item{method}{
NULL for automatic method selection or a suitable low-level method, see details
}
Expand All @@ -47,7 +43,11 @@
logical; if \code{TRUE}, any \code{NA} and \code{NaN}'s are removed from \code{x} before the quantiles are computed.
}
\item{...}{ignored}
\item{type}{
an integer selecting the quantile algorithm, currently only 0 is supported, see details
}
\item{object}{a integer64 vector}
}
\value{
\code{prank} returns a numeric vector of the same length as \code{x}.
Expand Down
22 changes: 11 additions & 11 deletions man/ramsort.integer64.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
\arguments{
\item{x}{ a vector to be sorted by \code{\link{ramsort.integer64}} and \code{\link{ramsortorder.integer64}}, i.e. the output of \code{\link{sort.integer64}} }

\item{i}{ integer positions to be modified by \code{\link{ramorder.integer64}} and \code{\link{ramsortorder.integer64}}, default is 1:n, in this case the output is similar to \code{\link{order.integer64}} }

\item{has.na}{
boolean scalar defining whether the input vector might contain \code{NA}s. If we know we don't have NAs, this may speed-up.
\emph{Note} that you risk a crash if there are unexpected \code{NA}s with \code{has.na=FALSE}
Expand All @@ -73,14 +71,9 @@ boolean scalar telling ramsort whether to sort \code{NA}s last or first.
boolean scalar telling ramsort whether to sort increasing or decreasing
}
\item{stable}{
boolean scalar defining whether stable sorting is needed. Allowing non-stable may speed-up.
}
\item{...}{ further arguments, passed from generics, ignored in methods }
\item{optimize}{
by default ramsort optimizes for 'time' which requires more RAM,
set to 'memory' to minimize RAM requirements and sacrifice speed
}
\item{i}{ integer positions to be modified by \code{\link{ramorder.integer64}} and \code{\link{ramsortorder.integer64}}, default is 1:n, in this case the output is similar to \code{\link{order.integer64}} }
\item{restlevel}{
number of remaining recursionlevels before \code{quicksort} switches from recursing to \code{shellsort}
Expand All @@ -90,11 +83,18 @@ number of remaining recursionlevels before \code{quicksort} switches from recurs
size of radix in bits
}
\item{stable}{
boolean scalar defining whether stable sorting is needed. Allowing non-stable may speed-up.
}
\item{optimize}{
by default ramsort optimizes for 'time' which requires more RAM,
set to 'memory' to minimize RAM requirements and sacrifice speed
}
\item{VERBOSE}{
cat some info about chosen method
}
\item{...}{ further arguments, passed from generics, ignored in methods }
}
\value{
These functions return the number of \code{NAs} found or assumed during sorting
Expand Down
8 changes: 4 additions & 4 deletions man/sort.integer64.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
\arguments{
\item{x}{ a vector to be sorted by \code{\link{ramsort.integer64}} and \code{\link{ramsortorder.integer64}}, i.e. the output of \code{\link{sort.integer64}} }

\item{decreasing}{
boolean scalar telling ramsort whether to sort increasing or decreasing
}

\item{has.na}{
boolean scalar defining whether the input vector might contain \code{NA}s. If we know we don't have NAs, this may speed-up.
\emph{Note} that you risk a crash if there are unexpected \code{NA}s with \code{has.na=FALSE}
Expand All @@ -22,10 +26,6 @@ boolean scalar defining whether the input vector might contain \code{NA}s. If we
\item{na.last}{
boolean scalar telling ramsort whether to sort \code{NA}s last or first.
\emph{Note} that 'boolean' means that there is no third option \code{NA} as in \code{\link{sort}}
}
\item{decreasing}{
boolean scalar telling ramsort whether to sort increasing or decreasing
}
\item{stable}{
Expand Down
20 changes: 10 additions & 10 deletions man/sortnut.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -144,33 +144,33 @@ sortorderrnk(sorted, order, na.count, ...)
\method{orderqtl}{integer64}(table, order, na.count, probs, ...)
}
\arguments{
\item{x}{ an \code{\link{integer64}} vector }

\item{sorted}{ a sorted \code{\link{integer64}} vector }

\item{...}{ further arguments, passed from generics, ignored in methods }

\item{table}{ the original data with original order under the sorted vector }

\item{order}{ an \code{\link{integer}} order vector that turns 'table' into 'sorted' }

\item{nunique}{ number of unique elements, usually we get this from cache or call \code{sortnut} or \code{ordernut} }

\item{nties}{ number of tied values, usually we get this from cache or call \code{sortnut} or \code{ordernut} }
\item{x}{ an \code{\link{integer64}} vector }

\item{denormalize}{ FALSE returns counts of unique values, TRUE returns each value with its counts }
\item{method}{ see details }

\item{nomatch}{ the value to be returned if an element is not found in the hashmap }

\item{nunique}{ number of unique elements, usually we get this from cache or call \code{sortnut} or \code{ordernut} }

\item{keep.order}{ determines order of results and speed: \code{FALSE} (the default) is faster and returns in sorted order, \code{TRUE} returns in the order of first appearance in the original data, but this requires extra work }

\item{probs}{ vector of probabilities in [0..1] for which we seek quantiles }
\item{nties}{ number of tied values, usually we get this from cache or call \code{sortnut} or \code{ordernut} }

\item{denormalize}{ FALSE returns counts of unique values, TRUE returns each value with its counts }

\item{na.skip.num}{ 0 or the number of \code{NA}s. With 0, \code{NA}s are coded with 1L, with the number of \code{NA}s, these are coded with \code{NA} }

\item{na.count}{ the number of \code{NA}s, needed for this low-level function algorithm }

\item{method}{ see details }

\item{...}{ further arguments, passed from generics, ignored in methods }
\item{probs}{ vector of probabilities in [0..1] for which we seek quantiles }
}
\value{
see details
Expand Down
12 changes: 6 additions & 6 deletions man/table.integer64.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ table.integer64(...
components can be so interpreted. (For \code{as.table} and
\code{as.data.frame}, arguments passed to specific methods.)}

\item{nunique}{
NULL or the number of unique values of table (including NA). Providing \code{nunique} can speed-up matching when \code{table} has no cache. Note that a wrong nunique can cause undefined behaviour up to a crash.
\item{return}{
choose the return format, see details
}

\item{order}{
By default results are created sorted by "values", or by "counts"
}

\item{method}{
NULL for automatic method selection or a suitable low-level method, see details
\item{nunique}{
NULL or the number of unique values of table (including NA). Providing \code{nunique} can speed-up matching when \code{table} has no cache. Note that a wrong nunique can cause undefined behaviour up to a crash.
}

\item{return}{
choose the return format, see details
\item{method}{
NULL for automatic method selection or a suitable low-level method, see details
}

\item{dnn}{the names to be given to the dimensions in the result (the
Expand Down
4 changes: 2 additions & 2 deletions man/tiepos.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ tiepos(x, ...)
\arguments{
\item{x}{a vector or a data frame or an array or \code{NULL}.}

\item{...}{ignored}

\item{nties}{
NULL or the number of tied values (including NA). Providing \code{nties} can speed-up when \code{x} has no cache. Note that a wrong nties can cause undefined behaviour up to a crash.
}

\item{method}{
NULL for automatic method selection or a suitable low-level method, see details
}

\item{...}{ignored}
}
\value{
an integer vector of positions
Expand Down
4 changes: 2 additions & 2 deletions man/unipos.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ unipos(x, incomparables = FALSE, order = c("original","values","any"), ...)

\item{order}{The order in which positions of unique values will be returned, see details}

\item{...}{ignored}

\item{nunique}{
NULL or the number of unique values (including NA). Providing \code{nunique} can speed-up when \code{x} has no cache. Note that a wrong nunique can cause undefined behaviour up to a crash.
}

\item{method}{
NULL for automatic method selection or a suitable low-level method, see details
}

\item{...}{ignored}
}
\value{
an integer vector of positions
Expand Down

0 comments on commit b09e20d

Please sign in to comment.