> kernelboot::kernelboot
function (data, statistic, R = 500L, bw = "default", kernel = c("multivariate",
"gaussian", "epanechnikov", "rectangular", "triangular",
"biweight", "cosine", "optcosine", "none"), weights = NULL,
adjust = 1, shrinked = TRUE, ignore = NULL, parallel = FALSE,
workers = availableCores())
{
call <- match.call()
kernel <- match.arg(kernel)
seed <- .Random.seed <======== HERE
n <- NROW(data)
m <- NCOL(data)
vars <- NULL
The reason why you haven't run into problems with this yet is when loading future (<= 1.14.0) together with your package, a side-effect was that .Random.seed
was (incorrectly) created. I've now cleaned this up, which means that with future (> 1.14.0) .Random.seed
may not be set. When running reverse package dependency checks, R CMD check kernelboot_0.1.5.tar.gz
now produces:
* checking tests ...
Running ‘test_parallel.R’
ERROR
Running the tests in 'tests/test_parallel.R' failed.
Last 13 lines of output:
+ set.seed(0xBEEF)
+ s1 <- kernelboot(mtcars, function(data) coef(lm(mpg ~ disp + hp + drat, data = data)),
+ R = 10, parallel = TRUE)
+
+ set.seed(0xBEEF)
+ s2 <- kernelboot(mtcars, function(data) coef(lm(mpg ~ disp + hp + drat, data = data)),
+ R = 10, parallel = TRUE)
+
+ stopifnot( all.equal(s1, s2) )
+
+ }
Error in kernelboot(mtcars, function(data) coef(lm(mpg ~ disp + hp + drat, :
object '.Random.seed' not found
Calls: stopifnot -> kernelboot
Execution halted