search for: mb706

Displaying 5 results from an estimated 5 matches for "mb706".

Did you mean: b706
2020 Oct 20
1
sum() (and similar methods) should work for zero row data.frames
>>>>> mb706 >>>>> on Sun, 18 Oct 2020 22:14:55 +0200 writes: >> From my side: it would be great if you (or R core) could prepare a patch, it would probably take me quite a bit longer than you since I don't have experience creating patches for R. > Best, Martin Basic...
2020 Oct 18
2
sum() (and similar methods) should work for zero row data.frames
...mmaries generally treat logicals as 0/1, > wouldn't it be easiest just to extend the check inside Summary.data.frame > with "&& !is.logical(x)"? > > > sum(as.matrix(a[FALSE,])) > [1] 0 > > -pd > > > On 17 Oct 2020, at 21:18 , Martin <rdev at mb706.com> wrote: > > > > The "Summary" group generics always throw errors for a data.frame with > zero rows, for example: > >> sum(data.frame(x = numeric(0))) > > #> Error in FUN(X[[i]], ...) : > > #> only defined on a data frame with all numeric...
2020 Oct 17
2
sum() (and similar methods) should work for zero row data.frames
The "Summary" group generics always throw errors for a data.frame with zero rows, for example: > sum(data.frame(x = numeric(0))) #> Error in FUN(X[[i]], ...) : #> only defined on a data frame with all numeric variables Same behaviour for min, max, any, all, ... . I believe this is inconsistent with what these methods do for other empty objects (vectors, matrices), where the
2020 Oct 18
0
sum() (and similar methods) should work for zero row data.frames
...variables However, given that numeric summaries generally treat logicals as 0/1, wouldn't it be easiest just to extend the check inside Summary.data.frame with "&& !is.logical(x)"? > sum(as.matrix(a[FALSE,])) [1] 0 -pd > On 17 Oct 2020, at 21:18 , Martin <rdev at mb706.com> wrote: > > The "Summary" group generics always throw errors for a data.frame with zero rows, for example: >> sum(data.frame(x = numeric(0))) > #> Error in FUN(X[[i]], ...) : > #> only defined on a data frame with all numeric variables > Same behaviou...
2020 Oct 18
0
sum() (and similar methods) should work for zero row data.frames
...cals as 0/1, wouldn't it be easiest just to extend the check inside Summary.data.frame with "&& !is.logical(x)"? > > > > > sum(as.matrix(a[FALSE,])) > > [1] 0 > > > > -pd > > > > > On 17 Oct 2020, at 21:18 , Martin <rdev at mb706.com> wrote: > > > > > > The "Summary" group generics always throw errors for a data.frame with zero rows, for example: > > >> sum(data.frame(x = numeric(0))) > > > #> Error in FUN(X[[i]], ...) : > > > #> only defined on a data f...