ecified 'default' is
NaN.
On Sat, 4/2/17, Martin Maechler <maech...@stat.math.ethz.ch> wrote:
Subject: Re: [Rd] RFC: tapply(*, ..., init.value = NA)
Cc: R-devel@r-project.org
Date: Saturday, 4 February, 2017, 10:48 PM
>>>>>
--
> On Wed, 1/2/17, Martin Maechler
> <maech...@stat.math.ethz.ch> wrote:
> Subject: Re: [Rd] RFC: tapply(*, ..., init.value = NA)
> Cc: R-devel@r-project.org Date: Wednesday, 1 February,
> 2017, 12:14 AM
>>>>> Suharto Anggono S
. The documentation could then say, for example: "If default = NA
(the default), NA of appropriate storage mode (0 for raw) is automatically
used."
On Wed, 1/2/17, Martin Maechler <maech...@stat.math.ethz.ch> wrote:
Subject: Re:
> Suharto Anggono Suharto Anggono via R-devel
> on Tue, 31 Jan 2017 15:43:53 + writes:
> Function 'aggregate.data.frame' in R has taken a different route. With
drop=FALSE, the function is also applied to subset corresponding to combination
of grouping
Function 'aggregate.data.frame' in R has taken a different route. With
drop=FALSE, the function is also applied to subset corresponding to combination
of grouping variables that doesn't appear in the data (example 2 in
https://stat.ethz.ch/pipermail/r-devel/2017-January/073678.html).
Because
> Henrik Bengtsson
> on Fri, 27 Jan 2017 09:46:15 -0800 writes:
> On Fri, Jan 27, 2017 at 12:34 AM, Martin Maechler
> wrote:
>>
>> > On Jan 26, 2017 07:50, "William Dunlap via R-devel"
>>
On Fri, Jan 27, 2017 at 12:34 AM, Martin Maechler
wrote:
>
> > On Jan 26, 2017 07:50, "William Dunlap via R-devel"
>
> > wrote:
>
> > It would be cool if the default for tapply's init.value could be
> > FUN(X[0]), so it would be
> Suharto Anggono Suharto Anggono via R-devel
> on Fri, 27 Jan 2017 16:36:59 + writes:
> The "no factor combination" case is distinguishable by 'tapply' with
simplify=FALSE.
>> D2 <- data.frame(n = gl(3,4), L = gl(6,2, labels=LETTERS[1:6]), N=3)
The "no factor combination" case is distinguishable by 'tapply' with
simplify=FALSE.
> D2 <- data.frame(n = gl(3,4), L = gl(6,2, labels=LETTERS[1:6]), N=3)
> D2 <- D2[-c(1,5), ]
> DN <- D2; DN[1,"N"] <- NA
> with(DN, tapply(N, list(n,L), FUN=sum, simplify=FALSE))
ABCDEF
1
If xtabs is enhanced then as.data.frame.table may also need to be
modified so that it continues to be usable as an inverse, at least to
the degree feasible.
On Thu, Jan 26, 2017 at 5:42 AM, Martin Maechler
wrote:
> Last week, we've talked here about "xtabs(), factors
> On Jan 26, 2017 07:50, "William Dunlap via R-devel"
> wrote:
> It would be cool if the default for tapply's init.value could be
> FUN(X[0]), so it would be 0 for FUN=sum or FUN=length, TRUE for
> FUN=all, -Inf for FUN=max, etc. But that would take
On a related note, the storage mode should try to match ans[[1]] (or
unlist:ed and) when allocating 'ansmat' to avoid coercion and hence a full
copy.
Henrik
On Jan 26, 2017 07:50, "William Dunlap via R-devel"
wrote:
It would be cool if the default for tapply's
It would be cool if the default for tapply's init.value could be
FUN(X[0]), so it would be 0 for FUN=sum or FUN=length, TRUE for
FUN=all, -Inf for FUN=max, etc. But that would take time and would
break code for which FUN did not work on length-0 objects.
Bill Dunlap
TIBCO Software
wdunlap
Last week, we've talked here about "xtabs(), factors and NAs",
-> https://stat.ethz.ch/pipermail/r-devel/2017-January/073621.html
In the mean time, I've spent several hours on the issue
and also committed changes to R-devel "in two iterations".
In the case there is a *Left* hand side part to
14 matches
Mail list logo