R/spSample.R

Defines functions spSample

# 'sample' gives warning for alias sampling due to incompatible results with
# earlier versions of R
spSample <- function(n, p) {
  #suppressWarnings(sample(length(p), size=n, replace=TRUE, prob=p))
  sample(length(p), size=n, replace=TRUE, prob=p)
}

Try the simPop package in your browser

Any scripts or data that you put into this service are public.

simPop documentation built on Nov. 10, 2022, 5:43 p.m.