That's a great work around, as I can eliminate renaming the results column
from 'x' to whatever. Thanks for the quick tip, Henrique.
On the other hand, I'm still stumped as to why aggregate() would name an
output column as 'if (stringsAsFactors) factor(x) else x'. That sort of
behaviour seems
One option is use this:
aggregate(list(t=tt$t), list(idx=tt$idx), length)
On Thu, Aug 28, 2008 at 4:36 PM, <[EMAIL PROTECTED]> wrote:
> Folks,
>
> I've been running into an odd situation that occurs when I use length()
> function with aggregate(), but not with either one separately. Together,
>
Folks,
I've been running into an odd situation that occurs when I use length()
function with aggregate(), but not with either one separately. Together,
the results looks correct but is given an unexpected name. 'if
(stringsAsFactors) factor(x) else x' instead of just 'x'.
# Numbers work ok
tt
3 matches
Mail list logo