When using method = "weights" in spatSample, the default replace = FALSE has the consequence that non 0 cells will be filled if the size asked is larger than the number of non 0 cells, losing the proportionality between the weights and the density of points generated. I think it would make more sense to have replace = TRUE as the default when method = "weights". In fact, I have a hard time finding a use for replace = FALSE when the weight method is used. Below is an example with the first case showing a lack of proportionality and the second case showing what I think should be the default.
Hi!
When using
method = "weights"
in spatSample, the defaultreplace = FALSE
has the consequence that non 0 cells will be filled if the size asked is larger than the number of non 0 cells, losing the proportionality between the weights and the density of points generated. I think it would make more sense to havereplace = TRUE
as the default whenmethod = "weights"
. In fact, I have a hard time finding a use forreplace = FALSE
when the weight method is used. Below is an example with the first case showing a lack of proportionality and the second case showing what I think should be the default.Thanks! François