[R-sig-Geo] sample points - sp package
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Fri Feb 10 19:54:49 CET 2012
On 02/10/2012 06:13 PM, Ana wrote:
> When I make a sample in sp, for example a random samping of 5 points in
> dataset1:
>
> sample.dataset1=spsample(dataset1, n = 5, "random")
>
> I have a sp object for the selected sampling...
>
> My question is : How can I extract from dataset2 the points & data for the
> coordinates(sample.dataset1) ?
>
> The dataset2 would be an object with the same area and coordinate system,
> but I would like to extract for the coordinates of sample.dataset1 the data
> in each point for dataset2.
>
over(sample.dataset1, dataset2)
> I didn't found a way to do this in the sp package docs, but I might have
> missed it.
http://cran.r-project.org/web/packages/sp/vignettes/over.pdf
>
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/sample-points-sp-package-tp7273420p7273420.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
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
More information about the R-sig-Geo
mailing list