I just saw this
r85704 | hornik | 2023-12-19 00:33:07 -0600 (Tue, 19 Dec 2023) | 1 line
Changed paths:
M /trunk/doc/NEWS.Rd
M /trunk/src/library/base/R/matrix.R
M /trunk/src/library/base/man/nrow.Rd
M /trunk/src/li
> Simone Giannerini
> on Sun, 24 Sep 2023 16:57:00 +0200 writes:
> Thank you for your comment, On Sat, Sep 23, 2023 at
> 9:51 PM Ben Bolker wrote:
>>
>> This is certainly worth discussing, but there's always a
>> heavy burden of back-compatibility; how much bette
Thank you for your comment,
On Sat, Sep 23, 2023 at 9:51 PM Ben Bolker wrote:
>
> This is certainly worth discussing, but there's always a heavy
> burden of back-compatibility; how much better would it be for NCOL and
> NROW to both return zero, vs. the amount of old code that would be broken
On 23/09/2023 3:41 p.m., Simone Giannerini wrote:
I know it's documented and I know there are other ways to guard
against this behaviour, once you know about this.
The point is whether it might be worth it to make NCOL and NROW return
the same value on NULL and make R more consistent/intuitive an
Às 20:41 de 23/09/2023, Simone Giannerini escreveu:
I know it's documented and I know there are other ways to guard
against this behaviour, once you know about this.
The point is whether it might be worth it to make NCOL and NROW return
the same value on NULL and make R more consistent/intuitive
This is certainly worth discussing, but there's always a heavy
burden of back-compatibility; how much better would it be for NCOL and
NROW to both return zero, vs. the amount of old code that would be broken?
Furthermore, the reason for this behaviour is justified as
consistency with the
I know it's documented and I know there are other ways to guard
against this behaviour, once you know about this.
The point is whether it might be worth it to make NCOL and NROW return
the same value on NULL and make R more consistent/intuitive and
possibly less error prone.
Regards,
Simone
On S
It's been documented for a long time that NCOL(NULL) is 1. What
particular problems did you have in mind? There might be other ways to
guard against them.
Duncan Murdoch
On 23/09/2023 1:43 p.m., Simone Giannerini wrote:
Dear list,
I do not know what would be the 'correct' answer to the fol
Dear list,
I do not know what would be the 'correct' answer to the following but
I think that they should return the same value to avoid potential
problems and hard to debug errors.
Regards,
Simone
---
> NCOL(NULL)
[1] 1
> NROW(NULL)
[1] 0
> sessionInfo()
R