Installation of plyr in R on Ubuntu does not work - plyr

I am having difficulties with installing plyr in R (on Ubuntu). The very same problem has been posted in various forums before (in fact I just posted this myself a while ago), but none of the suggested solutions there worked for me.
To summarize, I am trying to install it using this command (output below):
install.packages("plyr")
Installing package into ‘/home/m2108/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning message:
package ‘plyr’ is not available (for R version 3.0.2)
Then I have tried to manually download the package from the cran server and use this command instead and receive the same error:
install.packages("~/Downloads/plyr_1.8.2.tar.gz", repos = NULL, type = "source") Installing package into ‘/home/m2108/R/x86_64-pc-linux-gnu-library/3.0’ (as ‘lib’ is unspecified) ERROR: this R is version 3.0.2, package 'plyr' requires R >= 3.1.0 Warning in install.packages : installation of package ‘/home/m2108/Downloads/plyr_1.8.2.tar.gz’ had non-zero exit status
I have also ensured that I have internet access from within R. I have also tried to run the installation from within RStudio and from the console.
Does anyone have an idea, what I might be doing wrong?

Related

Why the "tidyverse" package cannot be installed in R?

The Warnings are shown as the picture in this link. And my R version is most updated 4.1.0
In the error message, it shows that you do not have rtools installed. You can follow the link and follow the instructions to install rtools.
https://cran.rstudio.com/bin/windows/Rtools/rtools40.html
Then, you can restart R and try again with tidyverse.
If you still have issues with tidyverse from CRAN, then you can try installing the package from GitHub.
install.packages("devtools")
devtools::install_github("tidyverse/tidyverse")

rgl package has non-zero status

installing to /home/mhasanyar/R/x86_64-pc-linux-gnu-library/3.4/rgl/libs
** R
** demo
** inst
** preparing package for lazy loading
Error : object ‘hcl.colors’ is not exported by 'namespace:grDevices'
ERROR: lazy loading failed for package ‘rgl’
removing ‘/home/mhasanyar/R/x86_64-pc-linux-gnu-library/3.4/rgl’
Warning in install.packages :
installation of package ‘rgl’ had non-zero exit status
You are using an old R version, earlier than R 3.6.0 where hcl.colors was introduced. The best thing you can do would be to update R, and then things should work.
If you can't do that or don't want to, then you can install rgl into versions as early as R 3.3.0, but you need to get the development version to do that. It contains a number of fixes to get it working in old R versions. The easiest way to do this is to install the remotes package, then run
remotes::install_github("dmurdoch/rgl")

Issue installing Tax4Fun

I'm trying to install the package "Tax4Fun" but keep failing.
I've tried 2 different ways:
install.packages("devtools")
devtools::install_url("http://tax4fun.gobics.de/Tax4Fun/Tax4Fun_0.3.1.tar.gz")
library(Tax4Fun)
The error that I get is:
ERROR: dependency 'biom' is not available for package 'Tax4Fun'
I've also tried installing biom directly
BiocManager::install("biom")
which does not work either
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.1 (2019-07-05)
Installing package(s) 'biom'
Installation path not writeable, unable to update packages: boot, foreign, KernSmooth,
mgcv, nlme, survival
Warning message:
package ‘biom’ is not available (for R version 3.6.1)
The other way I've tried to install Tax4Fun directly is
BiocManager::install("Tax4Fun")
I get the following error code:
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.1 (2019-07-05)
Installing package(s) 'Tax4Fun'
Installation path not writeable, unable to update packages: boot, foreign, KernSmooth,
mgcv, nlme, survival
Warning message:
package ‘Tax4Fun’ is not available (for R version 3.6.1)
Please help :)
You need to install it by downloading the packages from source (http://tax4fun.gobics.de). Then it depends whether you are running on Linux/Mac or Windows.
From the command line, you navigate to the folder containing the .tar.gz downloaded package. Then you should install it using:
R CMD INSTALL Tax4Fun_0.3.1.tar.gz
But dependancies are not installed by default. So you need to install dependancies manually, Qiimer and Biom, which are both deprecated on Cran. You install them using the same command, after you have downloaded the packages from the Cran archives.
Before that, you need to also install their dependancies in R:
install.packages("pheatmap")
install.packages("RJSONIO")
Then you should be able to proceed as mentioned above: install Qiimer and Biom from the command line first. Then Tax4Fun from the command line too.
If you are running on Windows you should have quite the same issues, but the installation of the different packages and dependancies is different. You can have a look at the readme at http://tax4fun.gobics.de

Rcpp won't install after updating R and RStudio on Mac OS X 10.11.6

I've just updated R to R3.3.2 and RStudio to 1.0.136. When I attempted to install UsingR package via the Studio Install Packages menu, I got this message:
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp’
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
Trying to use library(UsingR) produces this message.
library(UsingR)
Loading required package: Hmisc
Loading required package: ggplot2
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘Rcpp’
Error: package ‘ggplot2’ could not be loaded
I found some stuff about this online, but far too complicated for me to understand. Anyone have a simple way of fixing this?
I strongly suspect is an error on your end. You are using R 3.2.3, which is outdated by almost one year as R 3.3.0 came out in April, we are now at R 3.3.2.
R stores all its binary packages under a patch with the major.minor. So the most recent OS X (binary) version of Rcpp at indexed at CRAN in a patch with 3.3 (see [here])https://cloud.r-project.org/bin/macosx/mavericks/contrib/3.3/Rcpp_0.12.8.tgz) -- but your version of R will read only at 3.2 so you will not see updated versions.
The easiest fix is to update to R 3.3.2.
Or install manually by downloading from the Rcpp source URL at CRAN and then pointing at the source -- or doing install.packages("Rcpp", type="source"). You may run into other OS X issues for which you will get help from other questions here -- but this gets you current Rcpp.

Error in installing a modified package from local modifed zip file

I found a small bug in a R package. I communicated with the package author to update the code. While waiting for the author action to fix the bug, I am trying to fix the bug on my local version of the package.
I changed the R code, and also updated the MD5 of the associated file. The package is re-zipped, and I use this command to install it:
install.packages("path/to/the/file/modified_package.zip", repos = NULL)
it seems the installation is going well:
Installing package(s) into ‘C:/Users/Me/Documents/R/win-library/2.15’
(as ‘lib’ is unspecified)
package ‘x’ successfully unpacked and MD5 sums checked
However, when I try to load the package, there is an error:
> library(x)
Error in library(x) : ‘x’ is not a valid installed package
Any thoughts?
You can't just zip up the directories; you need to rebuild the package.
There are loads of guides around on how to build R packages. The easiest way (imho) is to use the devtools package.
library(devtools)
build("path/to/the/package")
install.packages("path/to/built/package.tar.gz", repos = NULL, type = "source")
Or
build("path/to/the/package", binary = TRUE)
install.packages("path/to/built/package.zip", repos = NULL, type = "win.binary")
You'll also need Rtools if you are running Windows. Install it with the installr package.
library(installr)
install.Rtools()

Resources