t; > > >
> > > > Hi Abby,
> > > >
> > > > Thank you for your positive feedback.
> > > >
> > > > I agree for your general comment about sorting.
> > > >
> > > > For ave specifically, ordering may not help because the out
Dear list,
This is a follow-up with another potential improvements of ave.
In the doc, x is documented as to be "a numeric", but this is not mandatory.
DF <- data.frame(x = letters, group = rep(1:2, each = 13))
ave(DF$x, DF$group, FUN = function(i) "a")
# [1] "a" "a" "a" "a" "a" "a" "a"
t it? (i.e is it relevant for a
> patch?)
>
> Thanks,
>
> Thomas
>
>
> >
> > De : Abby Spurdle
> > Envoyé : lundi 15 mars 2021 10:22
> > À : SOEIRO Thomas
> > Cc : r-devel@r-project.org
> > Objet :
t the entiere
> data.frame).
> >>
> >> Thanks,
> >>
> >> Thomas
> >>
> >> De : Abby Spurdle
> >> Envoyé : lundi 15 mars 2021 10:22
> >> À : SOEIRO Thomas
> >>
hink about it? (i.e is it relevant for a patch?)
Thanks,
Thomas
>
> De : Abby Spurdle
> Envoyé : lundi 15 mars 2021 10:22
> À : SOEIRO Thomas
> Cc : r-devel@r-project.org
> Objet : Re: [Rd] Potential improvements of ave?
>
> H
the entiere
>> data.frame).
>>
>> Thanks,
>>
>> Thomas
>> ________
>> De : Abby Spurdle
>> Envoyé : lundi 15 mars 2021 10:22
>> À : SOEIRO Thomas
>> Cc : r-devel@r-project.org
>> Objet : Re: [Rd]
On 16 March 2021 at 10:50, Martin Maechler wrote:
| I vaguely remember (from Luke's docs/presentation on ALTREP)
| that there are some "missing parts" here.
| One of them the not-existing R level functionality, another may be
| the C code below R's is.unsorted() ... maybe is.unsorted()
|
t;>
>> Thomas
>> ________
>> De : Abby Spurdle
>> Envoyé : lundi 15 mars 2021 10:22
>> À : SOEIRO Thomas
>> Cc : r-devel@r-project.org
>> Objet : Re: [Rd] Potential improvements of ave?
>>
> maintain the order of the input (as ave returns only x and not the entiere
> data.frame).
>
> Thanks,
>
> Thomas
>
> De : Abby Spurdle
> Envoyé : lundi 15 mars 2021 10:22
> À : SOEIRO Thomas
> Cc : r-devel@r-project.org
>
De : Abby Spurdle
Envoyé : lundi 15 mars 2021 10:22
À : SOEIRO Thomas
Cc : r-devel@r-project.org
Objet : Re: [Rd] Potential improvements of ave?
EMAIL EXTERNE - TRAITER AVEC PRÉCAUTION LIENS ET FICHIERS
Hi Thomas,
These are some great suggestions.
But I can't help but feel there's
Hi Thomas,
These are some great suggestions.
But I can't help but feel there's a much bigger problem here.
Intuitively, the ave function could (or should) sort the data.
Then the indexing step becomes almost trivial, in terms of both time
and space complexity.
And the ave function is not the
The bottleneck of ave is the call to interaction (i.e. not the call to
split/lapply).
Therefore, the following code runs as expected (but I may miss something...):
ave2 <- function (x, ..., FUN = mean)
{
if(missing(...))
x[] <- FUN(x)
else {
#g <- interaction(...)
Dear all,
I have two questions/suggestions about ave, but I am not sure if it's relevant
for bug reports.
1) I have performance issues with ave in a case where I didn't expect it. The
following code runs as expected:
set.seed(1)
df1 <- data.frame(id1 = sample(1:1e2, 5e2, TRUE),
13 matches
Mail list logo