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(...)
You're right. But I guess my confusion is proof that it can be
confusing.
What about "The value to be returned for positions where there are
either no partial matches or multiple partial matches" ?
("positions where the number of partial matches is not exactly 1" :-))
On 3/13/21 3:44 AM
Dear list,
I have some questions/suggestions about reshape.
1) I think a good amount of the popularity of base::reshape alternative is due
to the complexity of reshape documentation. It is quite hard (at least it is
for me) to figure out what argument is needed for respectively "long to wide"
I suspect this is as meant, but it is "multiply", the adverb, not the verb. So
it might be worth rephrasing, but "multiple" would be wrong (it is about cases
where you at one position have several partial matches, not several positions
where you have a partial match). "Non-uniquely partially mat