[R] FracSim set.seed
Peter Ehlers
ehlers at ucalgary.ca
Sun Jan 31 18:33:13 CET 2010
I think you may be out of luck. The randomization is in the
C-code of the function. You could recode that and build your
own version of the package. Or perhaps the authors would be
receptive to a request to make a suitable change.
-Peter Ehlers
Selwyn McCracken wrote:
> Hi,
>
> I am using the FracSim library to simulate a time series. However, the
> simulate function ignores my attempt to set the RNG seed I need for
> reproducible research. The published docs and google have not yielded an
> answer, so any help greatly received.
>
> Thanks,
> Selwyn
>
> ## Example code snippet
> library(FracSim)
> ## simulate some 1d fractal data
> set.seed(1234)
> sim1 = fracsim.1d(h=0.5,k=1000,n=5000)
>
> ## reset the seed
> set.seed(1234)
> sim2 = fracsim.1d(h=0.5,k=1000,n=5000)
>
> table(sim1$process == sim2$process) ## not identical...
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
--
Peter Ehlers
University of Calgary
More information about the R-help
mailing list