Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install multicore package on R v3.1.2?

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 
like image 837
Marcin Kosiński Avatar asked Jan 12 '15 12:01

Marcin Kosiński


People also ask

What does R CMD install do?

If used as R CMD INSTALL pkgs without explicitly specifying lib , packages are installed into the library tree rooted at the first directory in the library path which would be used by R run in the current environment.

What happens if you install a package twice in R?

This question already has answers here: It shouldn't be an issue unless you install a package as an admin user, and again as a normal user. Then you will have a version in two different locations on your system. That could lead to issues when upgrading, or confusion as to which version is loaded.


1 Answers

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.

like image 144
Dirk Eddelbuettel Avatar answered Oct 07 '22 05:10

Dirk Eddelbuettel