unable to reinstall mass package - r

I'm working with R Version 3.3.0 where the most installed packages have the versions 3.3.0, 3.3.2, 3.3.3.
Unfortunately, it seems that I have overwritten the MASS package with the actual version.
I needed the "vars" package and therefore a newer mass version was required. Now I'd like to reestablish the old mass package again.
Is there a solution to this problem? At present I do not want to update all the packages to actual versions as I'm not sure about the consequences...
Here is the Error Message when trying to install an older version...
Thank you!
Tobias
install.packages("O:/Shared_with_everyone/Rserver/MASS_7.3-45.tar.gz", repos = NULL, type="source")
* installing *source* package 'MASS' ...
** package 'MASS' successfully unpacked and MD5 sums checked
** libs
Warning: running command 'make -f "C:/Users/Public/R-33~1.0/etc/x64/Makeconf" -f "C:/Users/Public/R-33~1.0/share/make/winshlib.mk" SHLIB="MASS.dll" WIN=64 TCLBIN=64 OBJECTS="MASS.o lqs.o"' had status 127
ERROR: compilation failed for package 'MASS'
* removing 'C:/Users/Public/R-3.3.0/library/MASS'
* restoring previous 'C:/Users/Public/R-3.3.0/library/MASS'
Warning messages:
1: running command '"C:/Users/Public/R-3.3.0/bin/x64/R" CMD INSTALL -l "C:\Users\Public\R-3.3.0\library" "O:/Shared_with_everyone/Rserver/MASS_7.3-45.tar.gz"' had status 1
2: In install.packages("O:/Shared_with_everyone/Rserver/MASS_7.3-45.tar.gz", :
installation of package ‘O:/Shared_with_everyone/Rserver/MASS_7.3-45.tar.gz’ had non-zero exit status

under https://cran.r-project.org/bin/windows/contrib the relevant old versions can be found, which worked for Windows. Regards, Tobias

Related

Unable to install magrittr

Got a new company laptop and tried to install tidyr or installr, but it always fails because of magrittr.
If I want to install this package directly I'm getting the following error code:
* installing *source* package 'magrittr' ...
** package 'magrittr' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "C:/PROGRA~1/R/R-33~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-33~1.1/share/make/winshlib.mk" SHLIB="magrittr.dll" OBJECTS="pipe.o utils.o"' had status 127
ERROR: compilation failed for package 'magrittr'
* removing 'C:/Users/xxxx/Documents/R/win-library/3.3/magrittr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\xxxx\Documents\R\win-library\3.3" C:\Users\xxxx\AppData\Local\Temp\1\RtmpMHlNI9/downloaded_packages/magrittr_2.0.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘magrittr’ had non-zero exit status
I don't have admin privileges on this computer and could imagine that this could be the source of the problem, but I'm not sure.
What I tried:
Changed folder for libraries
Reinstalled all libraries
Tried different cron repos
Tried to install it on this way: install.packages("magrittr", update.packages(checkBuilt = TRUE))
Always the same error.
Is there any other way to install it?
Installing an archived version from source will work.
install.packages("cran.r-project.org/src/contrib/Archive/magrittr/…", repos = NULL, type="source")
You can utilize conda to install it:
conda install -c r r-magrittr
Reference:
https://anaconda.org/r/r-magrittr

how to install in R CvM2SL2Test package (Cramer-von Mises Two Sample Test)

I am trying to install the following package CvM2SL2Test in R, but i do not manage to do it. I have tried from CRAN, but it seems that it is not available anymore. In the end, i have tried locally (downloading the package from http://ftp.naist.jp/pub/CRAN/src/contrib/Archive/CvM2SL2Test/) but i am obtaining the following error:
Installing package into ‘C:/Users/David/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
* installing *source* package 'CvM2SL2Test' ...
** package 'CvM2SL2Test' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: comando ejecutado 'make -f "C:/PROGRA~1/R/R-34~1.4/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-34~1.4/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="CvM2SL2Test.dll" OBJECTS="CvM2SL2Test.o XCVM.o XCVMTailProb.o XCVMTailProb_EQ.o XCVMTailProb_NE1.o XCVMTailProb_NE2.o XCvMTest.o XFreqFunct.o"' tiene estatus 127
ERROR: compilation failed for package 'CvM2SL2Test'
* removing 'C:/Users/David/Documents/R/win-library/3.4/CvM2SL2Test'
In R CMD INSTALL
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\Users\David\Documents\R\win-library\3.4" "C:/Users/David/Downloads/CvM2SL2Test_2.0-1.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/David/Downloads/CvM2SL2Test_2.0-1.tar.gz’ had non-zero exit status
Given that i am using windows 10, i have extracted the folder, and used the extention .zip. Then i have been able to obtain the following result:
Installing package into ‘C:/Users/David/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
package ‘CvM2SL2Test’ successfully unpacked and MD5 sums checked
However, when using like library(‘CvM2SL2Test’), I see the following:
library('CvM2SL2Test')
Error in library("CvM2SL2Test") :
‘CvM2SL2Test’ is not a valid installed package
I do not know how to install propery this package in windows 10 in order to use it properly, how can i do it?
Thanks in advance.
You appear to have a problem running the make command. This probably indicates that you don't have the R Tools collection (see https://cloud.r-project.org/bin/windows/Rtools/) installed, or it is not installed properly.

Installation of archived package "prob" not working in R

I'm running R 3.4.2 and R Studio 1.0.153. I want to install the prob package in R. The prob package in an archived file. It is located here. I am trying to install the prob_1.0-0.tar.gz package. I have no problem downloading and opening the package archive file. The code is below, it seems I need to install the fAsianOptions package.
ERROR: dependency 'fAsianOptions' is not available for package 'prob'
* removing 'C:/Users/blake_000/Documents/R/win-library/3.4/prob' Warning in install.packages : running command
'"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l
"C:\Users\blake_000\Documents\R\win-library\3.4"
"C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/prob_1.0-0.tar.gz"'
had status 1 Warning in install.packages : installation of package
‘C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/prob_1.0-0.tar.gz’
had non-zero exit status
Unfortunately, the fAsianOptions package is also archived. It is located here and I downloaded version fAsianOptions_3010.79.tar.gz. There were a number of dependencies but I installed the required packages (timeDate, timeSeries, etc.)
However, the fAsianOptions package is not installing. The error code reads as follows:
install.packages("C:/Users/blake_000/Google Drive/Life/CSUEB/Fall
2017/6204- Probability/R Code/fAsianOptions_3010.79.tar.gz", repos =
NULL, type = "source") Installing package into
‘C:/Users/blake_000/Documents/R/win-library/3.4’ (as ‘lib’ is
unspecified)
* installing source package 'fAsianOptions' ...
** package 'fAsianOptions' successfully unpacked and MD5 sums checked
** libs
*** arch - i386 Warning: running command 'make -f "Makevars" -f "C:/PROGRA~1/R/R-34~1.2/etc/i386/Makeconf" -f
"C:/PROGRA~1/R/R-34~1.2/share/make/winshlib.mk"
SHLIB="fAsianOptions.dll" SHLIB_LIBADD='$(FLIBS)'
OBJECTS="EBMAsianOptions.o GammaFunctions.o
HypergeometricFunctions.o"' had status 127 ERROR: compilation failed
for package 'fAsianOptions'
* removing 'C:/Users/blake_000/Documents/R/win-library/3.4/fAsianOptions' Warning
in install.packages : running command
'"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l
"C:\Users\blake_000\Documents\R\win-library\3.4"
"C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/fAsianOptions_3010.79.tar.gz"'
had status 1 Warning in install.packages : installation of package
‘C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/fAsianOptions_3010.79.tar.gz’
had non-zero exit status
I'm hoping that someone can help me to install the fAsianOptions dependency so I can install the prob package. Or, if there's an easier way, please let me know!
I had the same problem. I solved it by installing lower version of R -2.9. prob is available in repository for this version.

Using old packages that has not been updated on newer version of R

I have updated R and get problems when I want to run old scripts. Specifically, one of the packages I use has been removed from CRAN and I get the following error message when I try to load the installed package (installed from a binary file of the latest version of the package without any problem. As you can see, the package in question is the ACER package):
Failed with error: ‘package ‘acer’ was built before R 3.0.0: please re-install it’
Is it possible to recompile the source file to get binary files that work on R > 3.0.0?? This package worked fine on previous version R 3.0.1, but not on R 3.1.1. Is there any way I can get this package correctly loaded on R 3.1.1 (using either the source file or the file compiled for R 3.0.1?
I already tried to install from source, but it doesn't work. I get this error messages, which don't make too much sense to me. Is there an easy way out of this?
> install.packages(pkgs="acer_0.1.2.tar.gz", type="source", repos=NULL)
Installing package into ‘C:/Users/user/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
* installing *source* package 'acer' ...
** package 'acer' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="acer.dll" OBJECTS="estimate_acer.o peaks.o"' had status 127
ERROR: compilation failed for package 'acer'
* removing 'C:/Users/user/Documents/R/win-library/3.1/acer'
* restoring previous 'C:/Users/user/Documents/R/win-library/3.1/acer'
Warning messages:
1: running command '"C:/PROGRA~1/R/R-31~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\user\Documents\R\win-library\3.1" "acer_0.1.2.tar.gz"' had status 1
2: In install.packages(pkgs = "acer_0.1.2.tar.gz", type = "source", :
installation of package ‘acer_0.1.2.tar.gz’ had non-zero exit status
I also tried installing it from the command line but get similar errors. Can anyone help?
Do you have Rcpp installed and on your path?
I think error code 127 on make means that the program couldn't be found in your $PATH and the only dependency of acer seems to be Rcpp.
Hope this helps
-A

twitteR package installation failure

Hi I'm trying to install twitteR package but it is giving error. Previous version I got the same error so I uninstalled it and re installed R again. But I am facing the same problem again. Can some one help me please. Thanks in advance.
** testing if installed package can be loaded
* DONE (rjson)
* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/usr/local/lib/R/site-library/RCurl’
ERROR: dependency ‘RCurl’ is not available for package ‘ROAuth’
* removing ‘/usr/local/lib/R/site-library/ROAuth’
ERROR: dependencies ‘ROAuth’, ‘RCurl’ are not available for package ‘twitteR’
* removing ‘/usr/local/lib/R/site-library/twitteR’
The downloaded source packages are in
‘/tmp/RtmpeTWabe/downloaded_packages’
Warning messages:
1: In install.packages("twitteR", dep = TRUE) :
installation of package ‘RCurl’ had non-zero exit status
2: In install.packages("twitteR", dep = TRUE) :
installation of package ‘ROAuth’ had non-zero exit status
3: In install.packages("twitteR", dep = TRUE) :
installation of package ‘twitteR’ had non-zero exit status
> library(twitteR)
Error in library(twitteR) : there is no package called ‘twitteR’
> version
_
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 0.2
year 2013
month 09
day 25
svn rev 63987
language R
version.string R version 3.0.2 (2013-09-25)
nickname Frisbee Sailing
Try to Install twitteR package, it will automatically try to install ROauth (since it's a suggested package), which depends on liboauth. You can download liboauth from http://liboauth.sourceforge.net.
Install Rcurl:
$sudo apt-get install libcurl4-openssl-dev
you can do in similar terms.Install an R package from the Linux command line. Let's say we would like to install the "likelihood" R package. you can download it by:
$ wget -q http://cran.csiro.au/src/contrib/likelihood_1.5.tar.gz
Next we use the R CMD INSTALL command to install it. Please note that depending on the installation destination you may need to have a superuser privileges:
$ sudo R CMD INSTALL likelihood_1.5.tar.gz
[sudo] password for lubos:
* installing to library ‘/usr/local/lib/R/site-library’
* installing *source* package ‘likelihood’ ...
** package ‘likelihood’ successfully unpacked and MD5 sums checked
** R
** data
** demo
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (likelihood)
NOTE: Be aware that some packages will require prerequisites. In that case use the above command to install prerequisites prior to your desired package.

Resources