[R-sig-Geo] Does over() in sp work with "fun=sum"?

Truong Ngoc Phuong truongngocphuong at gmail.com
Tue Dec 20 15:05:22 CET 2016


Dear list,
I try to simply aggregate some gridded data, but it seems like there is no
difference between "fun=mean" or "fun=sum". Did i do some thing wrong?

> pop.v = over(gridv, pop_u, fun=sum)$band1
> summary(pop.v)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
  74.00   89.00   97.00   92.89  100.00  105.00
> pop.v = over(gridv, pop_u, fun=mean)$band1
> summary(pop.v)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
  74.00   89.00   97.00   92.89  100.00  105.00

Thanks,
Phuong

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list