Milu,
To get the quickest help and keep everyone in the loop, you should cc the
help list.
I don't understand your question. If you want the mean GDP use the mean
function, if you want the sum of the GDP use the sum function.
Jean
On Fri, Jan 13, 2017 at 5:33 PM, Miluji Sb wrote:
> Dear Jean
Dear Jean,
Thank you so much for your reply and the solution, This does work. I was
wondering is this similar to 'rasterFromXYZ'? Thanks again!
Sincerely,
Milu
On Fri, Jul 22, 2016 at 3:06 PM, Adams, Jean wrote:
> Milu,
>
> Perhaps an approach like this would work. In the example below, I
>
Milu,
Perhaps an approach like this would work. In the example below, I
calculate the mean GDP for each 1 degree by 1 degree.
temp$long1 <- floor(temp$longitude)
temp$lat1 <- floor(temp$latitude)
temp1 <- aggregate(GDP ~ long1 + lat1, temp, mean)
long1 lat1GDP
1 -69 -55 0.90268640
Dear all,
I have the following GDP data by latitude and longitude at 0.5 degree by
0.5 degree.
temp <- dput(head(ptsDF,10))
structure(list(longitude = c(-68.25, -67.75, -67.25, -68.25,
-67.75, -67.25, -71.25, -70.75, -69.25, -68.75), latitude = c(-54.75,
-54.75, -54.75, -54.25, -54.25, -54.25, -5
4 matches
Mail list logo