R/UPpoisson.R

"UPpoisson" <-
function(pik) 
{if(any(is.na(pik))) stop("there are missing values in the pik vector")
as.numeric(runif(length(pik))<pik)
}

Try the sampling package in your browser

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

sampling documentation built on Nov. 2, 2023, 6:26 p.m.