rgl package has non-zero status - rgl

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

Related

new installation of RStudio not working properly

I am having a lot of OS issues with the new version of RStudio. I am working on a Mac.
It does not recognize the packages that I had to reinstall. The current problem I am dealing with is that source('filename.R') is not working.
I get the following:
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
trying URL 'https://cran.mirrors.hoobly.com/src/contrib/rmarkdown_2.19.tar.gz'
Content type 'application/x-gzip' length 3243575 bytes (3.1 MB)
==================================================
downloaded 3.1 MB
* installing *source* package ‘rmarkdown’ ...
** package ‘rmarkdown’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (rmarkdown)
The downloaded source packages are in
‘/private/var/folders/yk/spk56bkn22n8w43h0mr6x59xtb6t8m/T/RtmpTD79O7/downloaded_packages’
Error in eval(ei, envir) : object 'xfun' not found
I have re installed various libraries including xfun
I was having a lot of trouble knitting a markdown file so I tried to run the code from an r-script.
But I have the same error.
I am confused why it is trying to install rmarkdown and dplyr when I use source() in the script file.
Both dplyr and rmarkdown have already been installed as well as xfun.
So I think there is a problem with a path name where to find the various packages but I don't know how to fix this.

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.

Installation of plyr in R on Ubuntu does not work

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?

Install R package from source, without changing PATH (Windows)

I'm trying to install package rpart for R-2.14.0 on Windows 7, but I get the warning:
package ‘rpart’ is not available (for R version 2.14.0)
So I download the tar.gz file from the package page. I have installed Rtools but I disabled all the options, including the one that changes the PATH. Then I do the following:
> install.packages("C:/rpart_3.1-50.tar.gz", type="source")
Installing package(s) into ‘C:/Users/backupSam/Documents/R/win-library/2.14’
(as ‘lib’ is unspecified)
inferring 'repos = NULL' from the file name
* installing *source* package 'rpart' ...
** libs
*** arch - i386
ERROR: compilation failed for package 'rpart'
* removing 'C:/Users/backupSam/Documents/R/win-library/2.14/rpart'
* restoring previous 'C:/Users/backupSam/Documents/R/win-library/2.14/rpart'
Warning messages:
1: running command 'C:/PROGRA~1/R/R-214~1.0/bin/i386/R CMD INSTALL -l "C:/Users/backupSam/Documents/R/win-library/2.14" "C:/rpart_3.1-50.tar.gz"' had status 1
2: In install.packages("C:/rpart_3.1-50.tar.gz", type = "source") :
installation of package ‘C:/rpart_3.1-50.tar.gz’ had non-zero exit status
Any suggestions?
Since you have to set the PATH, but you're hesitant to do so because you're afraid you may hose something up, you can do it temporarily in your R session via:
pathRtools <- paste(c("c:\\Rtools\\bin",
"c:\\Rtools\\MinGW\\bin",
"c:\\MiKTeX\\miktex\\bin",
"c:\\R\\bin\\i386",
"c:\\windows",
"c:\\windows\\system32"), collapse=";")
Sys.setenv(PATH=paste(pathRtools,Sys.getenv("PATH"),sep=";"))

Resources