RFoptions(seed=0)
x <- seq(0, 10, 0.1)
model <- RMexp()
RFoptions(seed=0)
z <- RFsimulate(model, x)
plot(z)
RFoptions(seed=0)
b <- RFsimulate(RPbernoulli(model), x)
plot(b)
str(z)
sum( abs((z@data$variabl1 >=0 ) - b@data$variable1)) == 0 ## TRUE
RFoptions(seed=NA)
Run the code above in your browser using DataLab