-
From: jcrosbie ja...@crosb.ie
To: r-help@r-project.org
Cc:
Sent: Wednesday, October 17, 2012 4:45 PM
Subject: [R] aggregate function not working?
The aggregate function for some reason will now work for me.
The error I'm getting is:
Error in sort.list(y) : 'x' must be atomic for 'sort.list
The aggregate function for some reason will now work for me.
The error I'm getting is:
Error in sort.list(y) : 'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?
agPriceList=aggregate(PriceList$Size, list(PriceList$bandNum),sum)
*Price list dataframe:*
dput(PriceList)
If you read the error message carefully and look at the data you
included with dput() (for which I thank you!), you'll see that bandNum
is a list, not a vector, just as the error message told you.
I'm not sure how you created or imported your data frame, but
something appears to have not worked
On Oct 17, 2012, at 1:45 PM, jcrosbie wrote:
The aggregate function for some reason will now work for me.
The error I'm getting is:
Error in sort.list(y) : 'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?
You have managed to create a slightly pathological dataframe:
4 matches
Mail list logo