local({ previous_options <- options(warn = 2, digits = 8, stringsAsFactors = FALSE) on.exit(options(previous_options), add = TRUE) set.seed(42) first <- runif(5) set.seed(42) second <- runif(5) cat("same seed repeats here:", identical(first, second), "\n") cat("R baseline:", as.character(getRversion()), "\n") cat("stats namespace available:", requireNamespace("stats", quietly = TRUE), "\n") invisible(NULL) })