> Gabriel Becker
> on Fri, 17 May 2019 01:06:11 -0700 writes:
> Hi Martin,
> Thanks for chiming in. Responses inline.
> On Fri, May 17, 2019 at 12:32 AM Martin Maechler
> wrote:
>> > Gabriel Becker
>> > on Thu, 16 May 2019 15:47:57 -0700
Hi Martin,
Thanks for chiming in. Responses inline.
On Fri, May 17, 2019 at 12:32 AM Martin Maechler
wrote:
> > Gabriel Becker
> > on Thu, 16 May 2019 15:47:57 -0700 writes:
>
> > Hi Hadley,
> > Thanks for the counterpoint. Response below.
>
> > On Thu, May 16, 2019 at
> Gabriel Becker
> on Thu, 16 May 2019 15:47:57 -0700 writes:
> Hi Hadley,
> Thanks for the counterpoint. Response below.
> On Thu, May 16, 2019 at 1:59 PM Hadley Wickham
wrote:
>> The existing behaviour seems inutitive to me. I would consider these
>>
Herve Pages wrote:
> In my experience, and more generally speaking, the desire to treat
> 0-length vectors as a special case that deviates from the
> non-zero-length case has never been productive.
Good idea.
Gabriel Becker Wrote:
> > nrow(rbind(aa = c("a", "b", "c"), AA = character()))
> [1]
Hi Gabriel
> Personally, no I wouldn't. I would consider m==0 a degenerate case, where
there is no data, but I personally find matrices (or data.frames) with rows
but no columns a very strange concept.
This distinction between matrix and data.frames is the crux in this case.
>From the
On 5/16/19 17:48, Gabriel Becker wrote:
Hi Herve,
Inline.
On Thu, May 16, 2019 at 4:45 PM Pages, Herve
mailto:hpa...@fredhutch.org>> wrote:
Hi Gabe,
ncol(data.frame(aa=c("a", "b", "c"), AA=c("A", "B", "C")))
# [1] 2
ncol(data.frame(aa="a", AA="A"))
# [1] 2
Hi Herve,
Inline.
On Thu, May 16, 2019 at 4:45 PM Pages, Herve wrote:
> Hi Gabe,
>
>ncol(data.frame(aa=c("a", "b", "c"), AA=c("A", "B", "C")))
># [1] 2
>
>ncol(data.frame(aa="a", AA="A"))
># [1] 2
>
>ncol(data.frame(aa=character(0), AA=character(0)))
># [1] 2
>
>
Hi Gabe,
ncol(data.frame(aa=c("a", "b", "c"), AA=c("A", "B", "C")))
# [1] 2
ncol(data.frame(aa="a", AA="A"))
# [1] 2
ncol(data.frame(aa=character(0), AA=character(0)))
# [1] 2
ncol(cbind(aa=c("a", "b", "c"), AA=c("A", "B", "C")))
# [1] 2
ncol(cbind(aa="a", AA="A"))
On Thu, May 16, 2019 at 3:47 PM Gabriel Becker
wrote:
> Hi Hadley,
>
> Thanks for the counterpoint. Response below.
>
> On Thu, May 16, 2019 at 1:59 PM Hadley Wickham
> wrote:
>
>> The existing behaviour seems inutitive to me. I would consider these
>> invariants for n vector x_i's each with
Hi Hadley,
Thanks for the counterpoint. Response below.
On Thu, May 16, 2019 at 1:59 PM Hadley Wickham wrote:
> The existing behaviour seems inutitive to me. I would consider these
> invariants for n vector x_i's each with size m:
>
> * nrow(rbind(x_1, x_2, ..., x_n)) equals n
>
Personally,
Gabriel, you ask an insightful and instructive question. One of R's
great strengths is that we have a forum where this kind of edge-case
can be fruitfully discussed.
My interest in this would be the names of the arguments; in the magic
package I make heavy use of the dimnames of zero-extent
The existing behaviour seems inutitive to me. I would consider these
invariants for n vector x_i's each with size m:
* nrow(rbind(x_1, x_2, ..., x_n)) equals n
* ncol(rbind(x_1, x_2, ..., x_n)) equals m
Additionally, wouldn't you expect rbind(x_1[i], x_2[i]) to equal
rbind(x_1, x_2)[, i, drop =
Hi all,
Apologies if this has been asked before (a quick google didn't find it for
me),and I know this is a case of behaving as documented but its so
unintuitive (to me at least) that I figured I'd bring it up here anyway. I
figure its probably going to not be changed, but I'm happy to submit a
13 matches
Mail list logo