[R-sig-Geo] Extract values with over()

Paulo Justiniano Ribeiro Jr paulojus at c3sl.ufpr.br
Mon Nov 21 21:24:01 CET 2011


Dear Edzer and Alexandre

wouldn't the following work as requested?

fullgrid(grid) <- FALSE
class(grid)  ## SpatialPixels

ap3 <- as.SpatialPolygons.SpatialPixels(grid)
table(over(pontos, ap3))



Paulo Justiniano Ribeiro Jr
LEG (Laboratorio de Estatistica e Geoinformacao)
Universidade Federal do Parana
Caixa Postal 19.081
CEP 81.531-990
Curitiba, PR  -  Brasil
Tel: (+55) 41 3361 3573
VOIP: (+55) (41) (3361 3600) 1053 1066
Fax: (+55) 41 3361 3141
e-mail: paulojus AT  ufpr  br
http://www.leg.ufpr.br/~paulojus

On Mon, 21 Nov 2011, Edzer Pebesma wrote:

>
>
> On 11/21/2011 08:47 PM, ASANTOS wrote:
>> Dear colleges,
>>
>>      I try to extract values with over () function , but not working
>> with my script, when I make:
>>
>
> it only extracts values when there are values to extract, please read
> the documentation.
>
>>
>> was expected that the over() give the frequency of points inside each
>> parcel
>
> I wonder where you got this expectation from. If the documentation gave
> you this expectation, please let me know.
>
> table() can compute frequencies from indices.
> -- 
> Edzer Pebesma
> Institute for Geoinformatics (ifgi), University of Münster
> Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
> 8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
> http://www.52north.org/geostatistics      e.pebesma at wwu.de
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>


More information about the R-sig-Geo mailing list