How to install multicore package on R v3.1.2?
Asked Answered
A

1

7

I am using default command to install multicore package

install.packages('multicore','http://www.rforge.net/')

as written here http://www.rforge.net/multicore/files/ but I recieve warning:

install.packages('multicore','http://www.rforge.net/') Warning in install.packages : 'lib = "http://www.rforge.net/"' is not writable Would you like to use a personal library instead? (y/n) y Warning in install.packages : package ‘multicore’ is not available (for R version 3.1.2)

Does anybody know any solution to this? I can not use previous versions of R. I would like to use mclapply function from that package.

Thanks for help.

My session info is:

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] stringi_0.4-1 ggplot2_1.0.0

loaded via a namespace (and not attached):
 [1] colorspace_1.2-4 digest_0.6.8     grid_3.1.2       gtable_0.1.2    
 [5] MASS_7.3-35      munsell_0.4.2    plyr_1.8.1       proto_0.3-10    
 [9] Rcpp_0.11.3      reshape2_1.4.1   scales_0.2.4     stringr_0.6.2   
[13] tools_3.1.2 
Aileen answered 12/1, 2015 at 12:25 Comment(1)
have you tried only install.packages('multicore') ?Amitosis
B
26

Why do you need it?

Most of its functionality has been integrated into the parallel package which already comes with R. Have a look at its vignette, eg from within R via vignette() or else from here.

And the reason you cannot install 'multicore' is because it has been withdrawn by R Core, given how its functionality is (essentially entirely) in 'parallel' now.

Brokaw answered 12/1, 2015 at 12:35 Comment(7)
Because mclapply is a function that is recommended by hadley wickahm in he's newest book Advanced R.Aileen
But mclapply is now part of parallel.Brokaw
Whoever just downvoted does a) not understand CRAN packages and b) seems to know better than R Core which packages are needed. Let me repeat: multicore is retired because it is subsumed in parallel.Brokaw
@MarcinKosinski: Hadley says you're wrong (over IM with me); the book uses parallel::mclapply.Brokaw
Sorry for trouble. My oversight.Aileen
You should have probably mentioned in the answer that mclapply is now part of the parallel package.Hamburg
I do: "its functionality is (essentially entirely) in 'parallel' now" means that (almost all) functions from multicore are in parallel. Plus, OP asked about the package, not the function. Also see the comments made which re-state this.Brokaw

© 2022 - 2024 — McMap. All rights reserved.