Re: [R-pkg-devel] Save and restoring random number seed in a package function

2022-09-14 Thread Bill Dunlap
> Yes, set.seed() cannot accept .Random.Seed as an input; it can only take a single integer. If I recall correctly, S-plus's set.seed() would accept a .Random.seed value as an input. It did some basic validation checks on it and set it as the current .Random.seed. I don't recall the name of the

[R-pkg-devel] Save and restoring random number seed in a package function

2022-09-14 Thread Noah Greifer
Hello fellow developers, I am attempting to solve the problem of saving the state of the random generator so that the state can be recovered in a future call. Essentially, my function generates random numbers, performs an operation on them (saving the result), and throws them out (saving them woul