[R-sig-Geo] sample with varying intensity according to local density
Nicolas Meurisse
Nicolas.Meurisse at scionresearch.com
Mon Oct 20 06:03:00 CEST 2014
Hi all,
I want to sample locations within a defined area, but also optimize the spatial arrangement of my sample locations in order to:
1. sample some parts of the area more intensively (e.g. as a function of previous findings intensity, as it could be illustrated by a density map)
2. sample at regular intervals within each area, as opposed to pure random sampling (e.g. "regular" or "stratified random" as defined in sp package)
Here an example dataset:
n <- 10000
x1 <- matrix(rnorm(n), ncol = 2)
x2 <- matrix(rnorm(n, mean = 3, sd = 1.5), ncol = 2)
x <- rbind(x1, x2)
# scatterplot with smoothed densities color representation
smoothScatter(x)
# random sampling (not appropriate, as we want an arrangement that optimizes conditions 1 and 2)
points(sample(x[,1],20), sample(x[,2],20), col="red", pch=16)
I would greatly appreciate any insight someone might have as it seems there are lot of potential applications using such "stratified" sampling.
Many thanks !
Nicolas
________________________________
This e-mail and any attachments may contain information ...{{dropped:10}}
More information about the R-sig-Geo
mailing list