Re: [R-pkg-devel] Read and restore .Random.seed in package

2022-09-19 Thread Jan van der Laan
Thanks! I noticed that there was an almost identical question asked on this list only a few days ago that I completely missed. Sorry for that. Your example and the examples there at least give me a better way to write my function. Jan On 19-09-2022 11:58, Achim Zeileis wrote: On Mon, 19

[R-pkg-devel] Read and restore .Random.seed in package

2022-09-19 Thread Jan van der Laan
I have a function in which I need to draw some random numbers. However, for some use cases, it is necessary that the same random numbers are drawn (when the input is the same) [1]. So I would like to do a set.seed in my function. This could, however, mess up the seed set by the user. So