Closed cegbuna closed 6 years ago
Thanks for reporting. I cannot reproduce this. What is your sessionInfo()
and what does traceback()
report immediately after you get that error?
Thanks for responding. The sessionInfo()
and traceback()
outputs are below.
sessionInfo
R version 3.4.3 (2017-11-30)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] doSNOW_1.0.16 snow_0.4-2 doParallel_1.0.11 iterators_1.0.9 foreach_1.4.4 sp_1.2-7 RSQLite_2.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.15 magrittr_1.5 bit_1.1-12 xtable_1.8-2 lattice_0.20-35 R6_2.2.2 rlang_0.2.0 blob_1.1.0 tools_3.4.4 grid_3.4.4 DBI_0.8
[12] htmltools_0.3.6 crosstalk_1.0.0 yaml_2.1.17 bit64_0.9-7 leaflet_1.1.0.9000 digest_0.6.15 tibble_1.4.2 shiny_1.0.5 codetools_0.2-15 htmlwidgets_1.0 memoise_1.1.0
[23] mime_0.5 compiler_3.4.4 pillar_1.2.1 httpuv_1.3.6.2
traceback
10: conditionMessage(e)
9: value[[3L]](cond)
8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: tryCatchList(expr, classes, parentenv, handlers)
6: tryCatch({
while (i < n) {
if (i >= size) {
size <- min(2 * size, n)
length(a) <- size
}
a[i + 1] <- list(nextElem(x))
i <- i + 1
}
}, error = function(e) {
if (!identical(conditionMessage(e), "StopIteration"))
stop(e)
})
5: as.list.iter(it)
4: as.list(it)
3: e$fun(obj, substitute(ex), parent.frame(), e$data)
2: foreach(i = 1:n) %dopar% {
x <- rnorm(i, mean = mu, sd = sigma)
list(mu = mean(x), sigma = sd(x), own = my_stat(x))
} at #2
1: my_experiment(n = 3)
I don't see doFuture, future, ... in that session info - call sessionInfo()
after you've attached doFuture. Also, there are lots of other packages loaded too. Please try to reproduce this in a fresh R session.
I see your https://stackoverflow.com/questions/51754452/r-foreach-package-returns-error-message post. It looks like you've resolved this by upgrading to R 3.4.4. I'm closing this one.
Hi,
Thanks for the package.
I'm getting the following error message when I run the example in the package
Example
Error message
Is there a reason why?
Thank you E