R - Install.Packages failure? - r

the below shows my attempt to install a package in R using install.packages from a tar.gz but I get an error which is rather unhelpful. Any ideas?

The 127 error message means that there is no C/C++ compiler accessible for the build process in install.packages().
In order to install R packages from source in the Windows operating system, one must first install the R Windows Tools. RTools for Windows may be downloaded from the CRAN RTools for Windows Download Page.

Related

Warning message installing R packages on RStudio

I have had problems with the latest RStudio-1.2.1335 and RStudio-1.2.5001.
When I install a package, either from a .zip file or Online from CRAN, I get a warning message saying "Rtools is required to build R packages..."
I am only installing packages and not building one. I wonder if this is a bug. Warning message paste below.
install.packages("aod")
WARNING: Rtools is required to build R packages but is not currently
installed. Please download and install the appropriate version of Rtools
before proceeding:
When using R on Windows, some packages want to compile directly from the source code, but have a pre-compiled binary as a back-up.
This warning message is telling you just that. It is possible that you are not getting the latest version this way. In some cases, you will get a flat out error since there is no binary available.
The simple enough solution is to install Rtools.
https://cran.r-project.org/bin/windows/Rtools/

Install rPython under windows

I tried to install rPython under windows with install.packages("rPython"). However I am getting an error that the package does not exist.
Warning in install.packages :
package ‘rPython’ is not available (for R version 3.2.5)
In the installation doc of the package I can only find this:
WINDOWS SYSTEMS
===============
On a Windows system, the package can only be installed from source at this time. Details to come.
Is there a work-around to work with Python in R?
Try 'rPython-win' if you use windows.
rPython works in Linux.
https://github.com/cjgb/rPython-win

Error when installing R package using Rstudio

I want to install http://cran.r-project.org/src/contrib/Archive/mecdf/ using RStudio but when I use
> install.packages('C:\\Users\\jandre\\Desktop\\mecdf_0.6.1.tar.gz', repos=NULL, type="source")
I get this error:
Installing package into ‘C:/Users/jandre/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"C:/Program Files/R/R-3.1.1/bin/x64/R" CMD INSTALL -l "C:\Users\jandre\Documents\R\win-library\3.1" "C:/Users/jandre/Desktop/mecdf_0.6.1.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/jandre/Desktop/mecdf_0.6.1.tar.gz’ had non-zero exit status
This occurs in every package I want to install using the tar.gz file. I'm on Win7 x64. RStudio Version 0.98.1028
Can't think of a way to fix this at the moment -- sorry -- but the R administration manual says explicitly:
Note that installing R into a directory whose path contains spaces is not supported, and at least some aspects (such as installing source packages) will not work.
I don't know why this doesn't bite people much more often, given that C:/Program Files/... seems like a relatively normal place to install things on Windows.
I would also expect that the double quotation marks around your R executable name ("C:/Program Files/R/R-3.1.1/bin/x64/R") in the system call should have protected you from this problem ... ?
I had the same error message with the installation of some packages(under Windows 10 OS with R and Rstudio).
It seems that the R software (not R Studio) is dealing with the library where package are installed.
I uninstalled R and Rstudio and installed it a path without space (ex: C:\Program\R).I tried to load the packages that previously failed and it seemed to fix the problem.

I am trying to install package manipulate : message = not available for r 3.1.1

windows 7 -pro
r studio 0.98.945
r 3.1.1
I am trying to install manipulate:
install.packages("manipulate").
Warning in install.packages :
package ‘manipulate’ is not available (for R version 3.1.1)
is this package not available or is something wrong in my machine or how to get it ?
thanks for all update/help
best regards, Guy Przytula
It's not on CRAN. It's usually installed as part of the RStudio install process. I'd suggest to re-install RStudio.
Another possibility is offered by the RStudio support:
1.) The easiest workaround is to just install the package manually from its location in Program Files - you can zip up the C:\Program
Files\RStudio\R\library\manipulate folder and install it using
install.packages() - this will get the manipulate package installed
and running.
If that doesn't solve your issues, you should post at the RStudio support forum.

LOCAL R Package not running because of missing doMC dependancy

I am trying to get a local package to work but it depends on doMC which is only available for Mac and I don't have a Mac. Is there any way I can still make the package work? I use the following code:
install.packages("~/R/AMT/Code/CLVTools_1.0.5.tar.gz",repos=NULL,type="source")
After running the code I get the following error message:
Installing package into ‘C:/Users/alexa_000/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)ERROR: dependency 'doMC' is not available for package 'CLVTools'
* removing 'C:/Users/alexa_000/Documents/R/win-library/3.0/CLVTools'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-30~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\alexa_000\Documents\R\win-library\3.0" "C:/Users/alexa_000/Documents/R/AMT/Code/CLVTools_1.0.5.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/alexa_000/Documents/R/AMT/Code/CLVTools_1.0.5.tar.gz’ had non-zero exit status
Does anyone have any ideas how to run the package anyways?
Any kind of help highly appreciated
Based on the documentation, that package should run on any Unix system, not just OS X.
Your best bet is to install a virtual machine and put a Linux distro on it, or dual-boot your Windows PC with Linux.
More generally, if you are going to be doing a lot of data processing with open source tools like R, Linux is your friend.

Resources