R ROI_solve error - r

I am not able to find the R package "ROI.plugin.cplex" anywhere.
Any ideas how to get that package?
I am running Ubuntu 14.04 and R version 3.2.2
I tried
install.packages("ROI.plugin.cplex", repos="http://R-Forge.R-project.org")

This is a quite old question but since it seems unanswered. There exist 3 main sources for ROI packages CRAN, R-Forge and GitHub. ROI.plugin.cplex can be found on CRAN (don't know how this was 3 years ago).
Installation instructions for the plugins can be found at
http://roi.r-forge.r-project.org/installation.html.
Since gurobi and mosek publish their R bindings not on CRAN but on their own homepage,
also ROI.plugin.gurobi and ROI.plugin.mosek can not be put on CRAN. They are available via R-Forge or Github. For example
install.packages("ROI.plugin.gurobi", repos="http://R-Forge.R-project.org")
## or (recommended version)
remotes:::install_svn("svn://svn.r-forge.r-project.org/svnroot/roi/pkg/ROI.plugin.gurobi")
## or
remotes:::install_github("FlorianSchwendinger/ROI.plugin.gurobi")

Related

R installation problems - Onedrive and Rattle

I'm trying to install Rattle and am having problems installing RGtk2. I am using R version 4.1, so there may be a version compatibility issue. However, I noticed that RStudio is installing packages into OneDrive:
Installing package into ‘C:/Users/tdwri/OneDrive/Documents/R/win-library/4.1’
but I am using R in C:\Program Files\R\R-4.1.2\
Question 1: how do I make sure packages are installed in C:\Program Files\R\R-4.1.2 instead of OneDrive?
Question 2: How do I install rattle when I am getting the error:
package ‘RGtk2’ is not available for this version of R.
Question 3:
If the solution to the second question involves downgrading the R version, how can I do that?
I apologize for asking 3 questions. I'm trying to get Rattle to work and these problems came up.
I found an answer to this at https://rattle.togaware.com/
LATEST NEWS: RGtk2 Retired From CRAN December 2021
RGtk2 appears to have been retired from CRAN. To install it from the Microsoft CRAN snapshots:
This worked to get RGtk2 and install rattle
install.packages("https://cran.microsoft.com/snapshot/2021-12-15/bin/windows/contrib/4.1/RGtk2_2.20.36.2.zip", repos=NULL)
This worked- in addition don't forget to find file move it and resave it in the file you need it in.
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/carar/OneDrive/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
This worked for me on Mac OS
From this link
https://cran.r-project.org/bin/macosx/
I Installed lower version of R
I installed rattle library
Upgraded my R to latest version and everything work fine
Rattle was archived on CRAN recently but after an update is being unarchived.
This may take a day or so.
In the meantime the following should work:
install.packages("rattle", repos="https://rattle.togaware.com", type="source")
I just checked and it worked for me.
Also RGtk2 has been archived on CRAN though the author indicates it is remains functional.
Yes, please follow the instructions at https://rattle.togaware.com to install RGtk2 from MRAN instead.
install.packages("https://cran.microsoft.com/snapshot/2021-12-15/src/contrib/RGtk2_2.20.36.2.tar.gz", repos=NULL)

How to install RQDA version in R version 4.02?

How to install RQDA version in R version 4.02?
Warning in install.packages :
package ‘RQDA’ is not available (as a binary package for R version 4.0.2)
You could have a look at the fork at https://github.com/RQDA/RQDA. Since packages that RQDA rely on have been archived on CRAN (RGtk and GtkWidgets), RQDA was archived subsequently.
The official published package has been archived, because of some of its dependencies. However, the package can still be installed from the archives. The steps to do this are as follows:
Install RGtk2 from CRAN.
Install the archived versions of gWidgets and gWidgetsRGtk2. devtools::install_version can do this quite easily when the right arguments are passed to the function. Consult the help file.
Call library(RGtk2) at the R console. You will be prompted to install the GUI library Gtk+, if you don't already have it.
Install the archived version of RQDA from CRAN. If you are using a 64-bit system, you will have to pass the --no-multiarch flag, or else it will fail.
Launch RQDA with library(RQDA).
I have used these steps to successfully install the package on Windows 10 64-bit running R-4.0.3. Others have used a similar algorithm to do it on Linux and Mac with only slight variations.
Since I had to replicate this for some members of my team I wrote an R script that can be used to carry out the installation. You are welcome to try it out.
That said, development on the main RQDA branch has recommenced, so I expect a resolution of this issue in the near future.

Running lasso: package ‘glmnet’ is not available (for R version 3.4.3)

I'm trying to run lasso. As far as I can see, glmnet is the most popular package. However, I'm unable to install it. Does anyone know why? I checked and this package was most recently updated in October 2019.
Alternatively, are there other packages you'd recommend for running lasso?
I've looked at the answers here and still can't figure out how to install glmnet.
How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?
library(devtools)
install_version("glmnet", version = "3.0-2") #https://cran.r-project.org/src/contrib/Archive/glmnet/
Upgrading to the latest version of R (3.6.2) allowed me to download this package.

Can't install bigrf package

I'm having some extremely frustrating difficulty installing the bigrf R package.
I have tried the following:
install.packages('bigrf',repo='https://github.com/aloysius-lim/bigrf.git',type='source')
^^with dev mode on
install_github("aloysius-lim","bigrf")
install.packages("bigrf",source=true)
These have all been tried on R build 2.14 (which bigrf was built on), 2.15, 3.0.2 and 3.1.1
I am getting a not available for build x' every time.
Is bigrf defunct? I have seen a couple of posts here on SO which have used various builds of R requesting help with bigrf. the solutions IO have tried came from these threads :/
To install the current version of bigrf on CRAN:
install.packages("bigrf", dependencies=TRUE)
To install the development version on GitHub:
library(devtools)
install_github("bigrf", repo='aloysius-lim/bigrf')
Package ‘bigrf’ was removed from the CRAN repository.
Formerly available versions can be obtained from the archive.
Archived on 2015-11-21 as check problems were not corrected despite reminders from CRAN people that's what the note i get from the https://cran.r-project.org/web/packages/bigrf/index.html

R: can rpm files be used with Windows for possibly outdated R packages?

I was trying to run code that required the R packages ‘pkgDepTools’ and ‘Rgraphviz’. I received error messages saying that neither package is available for R version 2.15.0.
A Google search turned up the following webpage RPM Pbone that seems to have the packages:
http://rpm.pbone.net/index.php3/stat/4/idpl/17802118/dir/mandrake_other/com/R-pkgDepTools-1.20.0-1-mdv2012.0.i586.rpm.html
and
http://rpm.pbone.net/index.php3/stat/4/idpl/17802080/dir/mandrake_other/com/R-Rgraphviz-1.32.0-2-mdv2012.0.i586.rpm.html
However, the files have an *.rpm extension rather than the *.tar.gz or *.zip extensions I am used to.
I am using Windows 7 and R version 2.15.0. Can I install an R package from an *.rpm file?
From Wikipedia *.rpm seems like maybe it is more for Linux:
http://en.wikipedia.org/wiki/RPM_Package_Manager
Regarding other possible solutions, I have found several earlier posts here with similar questions about installing R packages that are not available for the most recent version of R:
Bivariate Poisson Regression in R?
Package ‘GeneR’ is not available
R Venn Diagram package Venerable unavailable - alternative package?
I have installed the latest version of Rtools and the package 'devtools'. Although I know nothing about them.
There is an archived version of 'Rgraphviz' here:
http://cran.r-project.org/src/contrib/Archive/Rgraphviz/
but I cannot locate an archived version of 'pkgDepTools'.
If I can install the packages on a Windows machine using the above *.rpm files could someone please provide instructions?
If I must use Rtools to build them I might ask more questions because the instructions at the link below are challenging for me:
http://cran.r-project.org/doc/manuals/R-admin.html#Building-from-source
To be completely transparent I am hoping someone might build them for me, if that is possible. Although I recognize the experience and knowledge gained from doing it myself would probably pay off in the long run.
Thank you for any advice.
pkgDepTools and Rgraphviz are BioConductor R packages not ones hosted on CRAN. Unless you configure your R to download packages from those repos, R will report that they are not available; it can only install from repos it has been configured to install from.
To install those BioConductor packages a lite installation method is provided:
source("http://bioconductor.org/biocLite.R")
biocLite(c("pkgDepTools", "Rgraphviz"))
Further details are provided on the Install page of the BioConductor website
In general you can't use rpm packages on Windows; rpm's are the equivalent of a binary package for Linux. Any C/C++/Fortran/etc code will have been compiled for Linux not Windows. If a package really isn't available for your version of R then check if there is a reason stated on CRAN (usually Windows binaries take a few days longer to produce or there may be requirements for software not available on the CRAN Windows build machines). You can try the WinBuilder service run by Uwe Ligges to build Windows Binaries of packages for you, but if the package was on CRAN and now isn't that suggests it no longer works with current R and can not be built.
In general try a wider search for packages; the first hit in my Google search results under the search string "pkgDepTools" is the Bioconductor page for the package which includes a link to the Windows binary and instructions on how to install the package from within R.
I think this merits an answer rather than a comment.
A gentleman at Bioconductor helped me get Rgraphviz installed. The primary problem was that the version of Rgraphviz I had downloaded only seems to work with the 32-bit version of R and I was running a 64-bit version of R. I was able to install Rgraphviz in the 32-bit version of R.
I had also made an error or two in the PATH statement during some of my attempts to install Rgraphviz. However, the post above in my second comment provides the instructions for installation.
You just, it seems, cannot install the normal download version of Rgraphviz in the 64-bit version of R.
I think many of our emails back and forth are now posted on the Bioconductor forum.
I might edit this answer with more detailed instructions in the next 24-hours.

Resources