Installing rgdal - backdate rgdal version versus update gdal version, and how? - r

Two part question:
1) Like the person who asked this question (rgdal won't install on AWS RStudio AMI), I'm running into problems installing the rgdal package on R running on Ubuntu 16.04. The package wants GDAL 1.11.4 or later, and Synaptic Package manager is only offering GDAL 1.11.3.
The solution offered on the above question is to install an older version of rgdal from the archive. On the other hand, the answer given to this older question (Trouble getting latest version of GDAL on ubuntu running R) is to install a more recent version of GDAL from ubuntu-unstable.
Do both of these approaches work?
2) What are the steps required for each approach (or the approach that works if they don't both work)?

What finally worked for me was trying to install an earlier version (v1.2-20) of rgdal that was compatible with gdal 1.11.3.
I was able to identify the correct version of rgdal using the documentation page here:
https://www.rdocumentation.org/packages/rgdal/versions/1.2-20
Then I used the devtools package to install the correct version:
require(devtools)
install_version("rgdal", version="1.2-20")
This page has helpful information on installation of earlier versions of R packages:
https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages
I attempted installing more recent versions of gdal both from source and with my package manager but continued to get various errors when I got to the step of trying to install rgdal.
What I don't know is why I kept getting errors when trying to work with gdal upgrades.

Related

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.

cannot install phytools in ubuntu 18.04 with R 3.6

cannot install phytools
tried with devtools
library(devtools)
install_github("liamrevell/phytools")
and
install.packages("phytools")
I keep getting the same error
ERROR: dependency ‘mnormt’ is not available for package ‘phytools’
and I cannot install mnormt because
package ‘mnormt’ is not available (for R version 3.6.3)
gfortran is already installed in my system
GNU Fortran (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
any help is highly appreciated,
thanks
On Ubuntu Linux I cannot get R to update to the latest version (>4.0 at the time of writing), so, like Dirk suggests I have to install an older version of the package, one compatible with the version of R I am running.
My R version is 3.6.3, released feb 2020
I go to the mnormt page and click on "old sources" https://cran.r-project.org/src/contrib/Archive/mnormt/
I see that version 1.5-6 is the most recent release which is prior to my version of R
Following these pages: "Installing older versions of packages" https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages I copy the relevant url into this code and run it in R
packageurl <- "https://cran.r-project.org/src/contrib/Archive/mnormt/mnormt_1.5-6.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
Which fixes my problem installing mnormt and also allows packages which depend on it to be installed in the standard way (as far as I tested it)
The current version of mnormt depends on a the current version of R; you chose to remain a version behind.
So just install the previous version of mnormt, for example via
cd /tmp
wget https://cran.r-project.org/src/contrib/Archive/mnormt/mnormt_1.5-7.tar.gz
R CMD INSTALL mnormt_1.5-7.tar.gz
Prefix that last INSTALL command with sudo, or change the permission/group membership of /usr/local/lib/R/site-library, if R tells you it cannot write there.
Once mnormt is installed, proceed with the installation of phytools.
Try to add the tag version to install command, for example: devtools::install_github('cran/mnormt#R-3.0.3')
Check what version you need and replace the tag after the '#'.

R - Installing package with remotes::install_github ask for higher version of the dependencies which BiocManager::install() can not find

I need to install few packages that should be installed with remotes::install_github() like
"acidgenomics/basejump" or "satijalab/seurat".
During the installation, it need to upgrade few other packages version. The BiocManager::install program cannot find those versions and I had to install those dependencies packages version with:
R CMD INSTALL IRanges_2.20.2.tar.gz
Then other packages, that use the same packages stop working. like DESeq2,
I get the error:
Error: package or namespace load failed for ‘DESeq2’:
objects ‘rowSums’, ‘colSums’, ‘rowMeans’, ‘colMeans’ are not exported by 'namespace:S4Vectors'
I found few answers that say it happen (like url)
remotes::install_github() isn't picking up the correct Bioconductor
devel repos, whereas installing with BiocManager::install() does work
as expected.
we have the R 3.6.0 installed as a module and a lot of users uses the same R version. I need all packages to work for everyone.
How can I make all variety packages versions to work?
Finally, I install new version of R 3.6.3 with Bioconductor 3.10 and all the packages install right.

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

Error in installing packages from RStudio

I have been trying to install the package "doby" from RStudio (ver 0.98.501 ) on ubuntu 13.04 but it keeps throwing the following warning and the package does not get installed.
Warning in install.packages :
package ‘doBy’ is not available (for R version 2.15.2)
I have followed all the instructions given here :
http://www.r-bloggers.com/installing-r-packages/
Can someone please suggest where I might be going wrong ?
If you are on Ubuntu, please see this README for Ubuntu from CRAN --- it will allow you to get to the current version of R (today 3.0.2, in a few days 3.0.3) with mininal effort.
Once you have a current R version, getting the doBy package (which depends on it) installed is a piece of cake too.
If however you prefer to stay with your version of R, you can manually fetch an older version of doBy from its CRAN archive. Download to, say, /tmp and run R CMD INSTALLby hand on it.
From http://cran.r-project.org/web/packages/doBy/index.html, package doBy depends on R version 3.0 and above. Your R version is 2.15.2. You will need to install a later version of R, and then change the settings in Rstudio to target the updated version.

Resources