How to install MVPARTwrap package in R version 3.6.1? - r

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")

Related

Having Issues installing tabulizer package in R

I had a script working with tabulizer, but had to clean my hard drive and reinstall R, and now I cant seem to even download and access the tabulizer library. I am now using R version 4.1.2 64 bit, and am thinking maybe I need to use an earlier version of R??? Here is the error message I get when I try and install tabulizer.
install.packages("tabulizer")
Installing package into ‘C:/Users/cdonner/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘tabulizer’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
I have tried to go to go to Cran (https://cran.r-project.org/src/contrib/Archive/tabulizer/) and download and unzip the libraries to my directory, but then I get an errors again. Any ideas? Thanks.
Enter this into the command window!
remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"), INSTALL_opts = "--no-multiarch")
It is not on CRAN.
You have to install using
ghit::install_github("ropensci/tabulizer")
or
devtools::install_github("ropensci/tabulizer")
github
I have just come to dealing with the same problem, but I got to solve it through the following steps:
the tabulizer package requires a Java environment. You need to download Java 64-bit or Java 32-bit through.
Make sure before that your windows/ mac is 32 bit or 64 bit by using the function sessionInfo().
Install the rJava package in R.
Create the Java environment through the command: Sys.setenv(JAVA_HOME="C:/Program Files/Java/jdk-18/")
Attention: the path of the file in step 3 is for java 64. the path for java 32 would be Sys.setenv(JAVA_HOME="C:/Program Files (x86)/Java/jdk-18/").
The other thing is that jdk-18 changes depending on everylaptop, in my case it is jdk-18, in your case it could jdk-17 for example.
Finally activate the library: library(rJava)
Voila. rJava and tabulizer work smoothly and nicely.
Got the same problem. (A lot) Packages were missing
I had to update R
Install java for R
Install Rtools42 from CRan
Install remotes
before running the command of #Dunbar111
remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"), INSTALL_opts = "--no-multiarch")

r package installed properly but "there is no package called ‘DiabetesTxPath-master" error

I'm trying to install a package called "DiabetesTxPath-master" from local files.(The file can be downloaded in https://github.com/rohit43/DiabetesTxPath)
I used the code below installing it.
'filename<-"DiabetesTxPath-master.zip"'
install.packages(filename,type="binary",repos=NULL)
but when I try to load the packaged by the code below,
library(DiabetesTxPath)
error comes up.
there is no package called ‘DiabetesTxPath-master'
There is no problem in location.
.libPaths()
[1] "C:/Program Files/R/R-3.4.2/library"'
and this is where I want my package to be installed.
(and I see my packaged installed in the folder with my eyes!)
2.I've also tried to run as an administrator. it didn't work either.
So what could be the probelm, and how could I fix this?
Any comment would be appreciated so much.
I've been trying it so hard for a week.
Try using
library(devtools)
install_github("rohit43/DiabetesTxPath")
the problem arises because the dependencies for this package
ERROR: dependencies 'FeatureExtraction', 'CohortMethod',
'OhdsiSharing' are not available for package 'DiabetesTxPath'
are not available for this package in R 3.5 and above .
Now you need to install older version of R where these dependencies were supported and try using the above method.

Installing local binary packages using R CMD INSTALL on a Mac

I came across a package that is not available on CRAN. I tried to install the package using:
Packages & Data > Package Installer > Local Binary Package > At User
Level > [FileName.tgz] > Install...
This didn't work and I am now trying to use the R CMD INSTALL command. However, it seems I need to run that command in the command line interface but I cannot get it to install properly.
The package I'm trying to install is called gEcon. It can be found here. In particular, I am getting the following error message after "installing" the package:
Error: package or namespace load failed for ‘gEcon’:
package ‘gEcon’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
I assume it's the way I'm installing it.
Thanks in advance.
You're going to need to install Xcode apparently, because you've got to install this from source per these directions:
Now, you've gotta update R to the latest stable release, or if you prefer you can find the exact minimum newest version needed for gEcon.
After upgrading R you can complete the installation from source.
Original answer to original question:
Two things:
To access the command line and use R CMD on an Apple computer, please use the terminal.app app. Please see this for more details.
An easier and probably better approach is to install your package from the author's Github (or BitBucket, etc) repository using devtools::install_github or just use devtools::install on the downloaded source project.

Error in R: (Package which is only available in source form, and may need compilation of C/C++/Fortran)

I'm trying to install the 'yaml' and 'stringi' packages in R-Studio, and it keeps giving me these errors:
> install.packages("stringi")
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘stringi’
These will not be installed
or
> install.packages('yaml')
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘yaml’
These will not be installed
How can I get these to install properly?
The error is due to R being unable to find a binary version of the package on CRAN, instead only finding a source version of the package and your Windows installation being unable to compile it. Usually this doesn't occur, but in this case was caused by the (temporary) outage of some of the mirrors at CRAN. If you type:
> getOption('repos')
CRAN CRANextra
"http://cran.rstudio.com" "http://www.stats.ox.ac.uk/pub/RWin"
attr(,"RStudio")
[1] TRUE
You will see that R uses "http://cran.rstudio.com" by default to look for a package to download. If you see the cran mirrors web page you can see at the top that "http://cran.rstudio.com" actually redirects you to different servers world wide (I assume according to the geo location).
When I had the above issue, I solved it by manually changing the repo to one of the urls in the link provided. I suggest you use a different country (or even continent) in case you receive the above error.
I provide below some of the urls in case the link above changes:
Brazil http://nbcgib.uesc.br/mirrors/cran/
Italy http://cran.mirror.garr.it/mirrors/CRAN/
Japan http://cran.ism.ac.jp/
South Africa http://r.adu.org.za/
USA https://cran.cnr.Berkeley.edu/
You need to run the function install.packages as follows:
install.packages('<package_name>', repo='http://nbcgib.uesc.br/mirrors/cran/')
#or any other url from the list or link
One of them should then work to install a binary from an alternative mirror.
You need to install RTools to build packages like this (i.e., a source package rather than a binary). After you install Rtools, then try again to install.packages("ggplot2") and R will prompt you with:
Do you want to attempt to install these from source?
y/n:
(see the picture below)
You need to answer y and it will try to compile the package so it can be installed.
Struggled with this issue today, solved it for now by first downloading the windows binary and then installing e.g.
install.packages("https://cran.r-project.org/bin/windows/contrib/3.3/stringi_1.1.1.zip", repos =NULL)
Just go to https://cran.r-project.org/ and then R Binaries/Windows/contrib and copy the url as argument to install.packages()
Install the package from a zip file - downloadable from the r-project website.
In basic R
go to Packages
Install packages from local files.
In RStudio
go to Packages
Install packages
Install from Package Archive File.
I had this issue when using an out-of-date version of R, so no binaries were available. The simple solution was to update my version of R.
Anything worked for me, until I found out my computer had an old version of R installed. Uninstalling everything and installing the newest R version worked!
I had to download the latest version of Rtools:
Go into the downloads folder and double click it to install it.
Close and reopen any R session.
Now packages should install like normal.
However, if you still have trouble, try installing the package from source (using type="source")
Like this:
install.packages("dplyr", type="source")

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.

Resources