In reference to the statement set.seed(), can I get the seed instead after running some code if I didn\'t set it explicitly?
I\'ve been re-running some
Hong's answer above is robust. For quick and dirty solutions, where I just re-execute a whole script until I get interesting behavior, I randomly pick an integer, print it out, then use that as a seed. If my particular run has interesting behavior, I note that seed:
eff_seed <- sample(1:2^15, 1)
print(sprintf("Seed for session: %s", eff_seed))
set.seed(eff_seed)