Re: [R] random sample from list

2012-04-05 Thread David Winsemius
On Apr 5, 2012, at 12:00 AM, Daisy Englert Duursma wrote: random selection of cells in raster based on distance from xy locations Hi, I am trying to sample a raster for random cells that occur within a specific distance of point locations. I have successfully found multiple ways of doing

Re: [R] random sample from list

2012-04-05 Thread Rui Barradas
Hello, > > #Here is how I have tried to sample but it is not sampling from the right > part of the list > > bg<- z_nonna[sample(1:length(z_nonna), 5000, replace=FALSE)] > You are sampling from the length of z_nonna, with no guarantee that they are indices to unique list elements. Try this. #

[R] random sample from list

2012-04-04 Thread Daisy Englert Duursma
random selection of cells in raster based on distance from xy locations Hi, I am trying to sample a raster for random cells that occur within a specific distance of point locations. I have successfully found multiple ways of doing this but have memory issues with very large datasets. To overcome