Hi all,
I am checking the cross references at CRAN and base R, and I am having
trouble understanding how to reconcile the documentation and how R
help links work.
Checking the documentation [1] it seems that in a cross reference such
as \link[pkg:x]{text} x should be a topic (created with \alias{
It can be informative to look at what the actual functions being discussed do.
Dim is an internal, meaning written in some variant of C, perhaps:
> dim
function (x) .Primitive("dim")
The function nrow, in my distribution, actually just calls dim() and throws
away one dimension:
> nrow
functio
On Mon, Sep 2, 2024 at 10:05 AM Tomas Kalibera wrote:
>
>
> On 4/25/24 17:01, Ivan Krylov via R-devel wrote:
> > On Thu, 25 Apr 2024 14:45:04 +0200
> > Jeroen Ooms wrote:
> >
> >> Thoughts?
> > How verboten would it be to create an empty external pointer object,
> > add it to the preserved list,
Why would a design made by perhaps different people at different times have to
be consistent?
Why complicate a simple design meant to be used in 2-D objects to also handle
other things?
It is a bit like asking why for a vector you cannot use the same verb to
measure length as in one sense a
Suggest you look at dplyr::mutate as this functionality is widely used
there and has shown itself to be useful.
On Tue, Aug 27, 2024 at 9:16 AM Sebastian Meyer wrote:
>
> Am 27.08.24 um 11:55 schrieb peter dalgaard:
> > Yes. A quirk, rather than a bug I'd say. One issue is that the internal
> >
The fact that it is consistent with the documentation is not the
point. The point is that the design itself is inconsistent.
On Sun, Sep 8, 2024 at 8:27 AM Marc Schwartz wrote:
>
> Hi Gabor,
>
> In strictly reading the help files for both nrow() and row(), the 'x'
> argument in the former case
Hi Gabor,
In strictly reading the help files for both nrow() and row(), the 'x' argument
in the former case is "a vector, array, data frame, or NULL.", whereas in the
latter case it is "a matrix-like object, that is one with a two-dimensional
dim.".
Thus, I would expect row() to fail on a >= 3
In the following nrow provides the expected result but row gives an
error. I would have thought that they would both work or both fail.
aa <- array(dim = 5:3)
nrow(aa)
## [1] 5
row(aa)
## Error in row(aa) : a matrix-like object is required as argument to 'row'
# this does work:
s