>>>>> "jim" == jim holtman <jholt...@gmail.com> writes:
> Is this what you want: >> aggregate(x$Sim_1986, list(trunc(x$Latitude)), mean) > Group.1 x 1 82 55.04276 2 83 60.26186 3 84 39.40297 4 85 > 22.12000 >> You could also use cut to convert Latitude to a factor: aggregate(x$Sim_1986, cut(x$Latitude, breaks=seq(-55,85,by=1)), mean) Mike >> values between where Latitude 85, 84, 83, 82. The maximum >> latitude in the dataset as a whole is 83.75 and the >> minimum is -55.75. >> ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.