Hi
My dataframe looks like this
data=
id V1 V2 V3 V4
1 5 6 7 8
1 10 20 30 40
2 23 54 54 6
3 43 54 54 33
4 12 34 54 54
4 34 54 23 52
I have to sum by id
I used command aggregate(data,by =list(data$id),FUN=sum)
Error i face is
Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L), na.rm =
The error message is clear: your problem is that your data.frame (note
the period) contains factors. Use str(data) -- also don't use data as
it's a function name -- to see which ones and change as appropriate.
Michael
On Wed, Feb 29, 2012 at 7:16 AM, arunkumar akpbond...@gmail.com wrote:
Hi
Hi,
When I run the Aggregate function in repeat loop, I got the following error:
Error in sort.list(unique.default(x), na.last = TRUE) :
'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?
How to solve this error. Anyone can help me. Urgent.
Thanks.
Meenakshi.
--
View
3 matches
Mail list logo