[R-sig-Geo] Not so random sampleRandom in raster package

Edzer Pebesma edzer.pebesma at uni-muenster.de
Thu Feb 9 17:58:04 CET 2012



On 02/09/2012 05:02 PM, Etienne B. Racine wrote:
> It seems that sampleRandom isn't so random.
> 
> # try this :
> library(raster)
> r <- raster(matrix(1:25, 5, 5))
> sampleRandom(r, 25)
> ## 1 6 11 16 21 2 7 12 17 22 3 8 13 18 23 4 9 14 19 24 5 10 15
> sampleRandom(r, 25)
> ## 1 6 11 16 21 2 7 12 17 22 3 8 13 18 23 4 9 14 19 24 5 10 15
> 
> I haven't seen any documentation about this behavior.
> 

Isn't the more important question whether you saw documentation that is
in conflict with this behaviour?

> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> 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