reproduce_model: Reproduce a result

Description Usage Arguments Details Examples

View source: R/reproduce_model.R

Description

Helps reproduce the result of a simulation by restoring the RNG to the state of a supplied null model object.

Usage

1

Arguments

model

the model object containing the result to be reproduced.

Details

Works by resetting the RNG state to what it was for a given EcoSimR simulation. This only works if the user saved the seed with the saveSeed parameter.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
finchMod <- cooc_null_model(dataWiFinches, algo="sim1",saveSeed=T)
## Check model output
mean(finchMod$Sim)

reproduce_model(finchMod)

finchMod <- cooc_null_model(dataWiFinches, algo="sim1")
## Check model output is the same as before
mean(finchMod$Sim)
reproduce_model(finchMod)

## End(Not run)

EcoSimR documentation built on May 2, 2019, 7:26 a.m.