Displaying 1 result from an estimated 1 matches for "yeara".
Did you mean:
year
2007 Sep 08
1
Problem with the aggregate command
...he years. In other words my output should be like this
Year Median
1991 123
1992 145
1993 132
etc.
The sample lines of code to do this operation is
set1 <- subset(as.data.frame(dataset),rep1==1)
set2 <- subset(as.data.frame(dataset),rep1==0)
lst <- list(unique(yeara))
y1 <- aggregate(set1,lst,median)
y2 <- aggregate(set2,lst,median)
However I'm getting an error as follows
Error in FUN(X[[1]], ...) : arguments must have same length
Can somebody please help me with what I'm doing wrong here?
Thanks in advance
Regards
Anup
----------...