binAverage(x, y, xmin, xmax, xinc)
x
, the mid-points of the bins, and y
, the average y
value in the bins.y
vector is averaged in bins defined for x
.library(oce)
data(co2)
plot(co2)
avg <- binAverage(time(co2), co2, 1950, 2000, 2)
lines(avg$x, avg$y, col='red')
Run the code above in your browser using DataLab