save.seed: Save Seed

Description Usage Arguments

Description

Simple function to create a seed token, that can later be assigned to .Random.seed this will allow reproducibility of results, even when pieces of the code are moved around The downside is that the code will slowly get cluttered with seed tokens, which at some point will need to be replaced & the test code updated. But this will forstall that day, and at least ensure that code that passed the test is being used to replace the test code. And that reassures me greatly. Thanks to Ben Bolker's answer on Stack Overflow: http://stackoverflow.com/questions/13997444/print-the-current-random-seed-so-that-i-can-enter-it-with-set-seed-later The seed can be restored by doing load("SeedToken

Usage

1
save.seed(run.id, seed.id)

Arguments

run.id

Identifies which test run is being run

seed.id

Identifies the location where the seed needs saving


akeyel/spatialdemography documentation built on May 12, 2019, 4:43 a.m.