Warning message installing R packages on RStudio - r

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/

Related

How to install MVPARTwrap package in R version 3.6.1?

I am trying to install mvpart and MVPARTwrap packages in R version 3.6.1.
I install on my PC the folder of these two packages in zip version and load them in the relative folder of the package.
When I run the script library(mvpart) I get this message:
ERROR: 'mvpart' package was built before R 3.0.0: please reinstall it."
I try to load this library in the old version of R (version 2.15) and the message is
in install.packages (mvpart): object 'mvpart' not found".
I do not understand why it is impossible to load this package. Thanks so much.
Maybe the answer is no more relevant, but I just had to install those libraries so maybe it will still help someone later. I suggest the install from github as it will install dependencies, you need however to be able to compile the source. So here we go :
first install rtools if it is not already installed go here and follow the instruction
update/install devtools if necessary as described here
using this command, it should work now. you may be asked to update some packages, accept all
devtools::install_github("cran/mvpart")

Warning: Rtools is required

Every time when I install package this warning occurs :WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
I have been using R-Studio since 4 months and I did not come across this warning before. Despite getting this warning every time my installation succeeds.
From here: missing Rtools, should I be worried?
This means that if you are going to install packages that need compilation, you also have to install Rtools in your system.
https://cran.r-project.org/bin/windows/Rtools/
I would like to translate the revolution measure from https://blog.csdn.net/weixin_42098685/article/details/105864543.
First step:
Download and install the right Rtools for your R.
Second step:
Tell the Rstudio where the Rtools is installed.
Use this command (the sentence between the ##) :
writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"',con="~/.Renviron")
And it should Run as administrator.
Finally:
Type the sentence between ## to examine whether we have succeed:
Sys.which("make")
if you see a path rather than blank it means it had succeed.
Like this

R - Install.Packages failure?

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.

R-Studio on OSX can't load mosaic package

I am running OSX 10.10, R-Studio Version 0.99.484, and R version 3.2.2.
I just made a fresh install of R and R-Studio using the installers from their respective websites. I use install.packages to install "mosaic" and then I try loading it using library, but it gives me the following error:
library("mosaic", lib.loc="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")
Error : object ‘dendro_data.hclust’ is not exported by 'namespace:ggdendro'
Error: package or namespace load failed for ‘mosaic’
I tried reinstalling ggdendro but nothing. Does anyone have any advice on how to deal with this issue?
I encountered this same error and seem to have somewhere along the way resolved it. Steps taken include:
cleaned out my libraries (local and System)
used Disk Utility to repair any odd permissions
reinstalled R
opened RStudio and imported package with dependencies from the repository:
> install.packages("mosaic", lib="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")
console prompted me to choose the older precompiled package or the newer, I chose older
Do you want to install from sources the package which needs compilation?
y/n: n
mosaic loaded happily
> library("mosaic", lib.loc="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")

problem when installing RTextTools for R

I was trying to install RTextTools package for R, but failed. Here is the output from the screen
> > install.packages("RTextTools")
Warning in install.packages("RTextTools") :
argument 'lib' is missing: using 'C:\Users\datamining\Documents/R/win-library/2.10'
--- Please select a CRAN mirror for use in this session ---
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.10
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘RTextTools’ is not available
What's the reason for this problem, and how to fix it? Thanks.
There are two distinct, but related, issues:
You are running version 2.10 of R which is two years old. CRAN supports only the current version with pre-built binaries. You could try installing from source.
RTextTools, as can be seen on its CRAN page also requires at least R version 2.13.
So in short: you should upgrade.
I have resolved the issue. I have Download RTextTools From Given Link.

https://cran.r-project.org/src/contrib/Archive/RTextTools/
and copy RTextTools_1.4.2.tar.gz file in project root folder then run this command in project folder in terminal
"R CMD INSTALL RTextTools_1.4.2.tar.gz"
After running this command I receive below error
"ERROR: dependencies ‘SparseM’, ‘randomForest’, ‘tree’, ‘e1071’, ‘ipred’, ‘caTools’, ‘maxent’, ‘glmnet’, ‘tau’ are not available for package ‘RTextTools’".
Now install each dependencies from RStudio or RConsole (Any Editor used by you) by simply running this code.
install.packages("caTools").
Install all 9 required packages One By One (In My Case it was 9 Packages Dependencies required by RTextTools) all packages will be installed except 'maxent'.
Now download maxent from the given link.
https://cran.r-project.org/src/contrib/Archive/maxent/.
and copy maxent_1.3.3.1.tar file in project folder then run this command in project folder in terminal.
"R CMD INSTALL maxent_1.3.3.1.tar"
Now For RTextTools Run this command again in Terminal.
"R CMD INSTALL RTextTools_1.4.2.tar.gz"
All is done Now..
But the Last Step is
Load the RTextTools using.
library(RTextTools)
You will see one more Error: Load SparseM Now Loading SparseM use code below.
library(SparseM)
and in the last Load RTextTools
library(RTextTools)
RTextTools is dependent on a number of packages, most of which require R 2.13+. You should always keep R updated to the latest version, since each update contains numerous bug fixes and performance enhancements.
If you can't install packages from repository or the packages are not available anymore, just follow this steps:
Install.packages("devtools")
check -- library("devtools")
install_github("cran/maxent")
install_github("cran/RTextTools")

Resources