R/Trunc.R

Trunc <-
function(n, T.dist, T.dist.par, L=-Inf, R=Inf){
 Trunc.data = c()
 while(length(Trunc.data)<n){
   x = rd(1, T.dist=T.dist, T.dist.par=T.dist.par)
   if(L<x & x<R)  Trunc.data=c(Trunc.data,x)
   }
 return(Trunc.data)
}

Try the Sim.PLFN package in your browser

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

Sim.PLFN documentation built on May 2, 2019, 5:51 a.m.