Package Installation Problem

Hey!
I'm new to R and I can't seem to get RStudio working properly. I want to do analysis of 16S rRNA data and for that I need to integrate QIIME2 with R. Specifically, I need devtools::install_github("jbisanz/qiime2R") to work, but I always get error messages because of an Installation Problem with Rcpp.
I'm using R 3.6.3 on Windows 10. I have Rtools 3.5.0.4 installed.

So, first I installed ggplot2:

> install.packages("ggplot2")
Installing package into ‘C:/Users/trebe/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘ps’, ‘processx’, ‘callr’, ‘prettyunits’, ‘backports’, ‘desc’, ‘pkgbuild’, ‘rprojroot’, ‘rstudioapi’, ‘ellipsis’, ‘evaluate’, ‘magrittr’, ‘pkgload’, ‘praise’, ‘colorspace’, ‘assertthat’, ‘utf8’, ‘vctrs’, ‘Rcpp’, ‘testthat’, ‘farver’, ‘labeling’, ‘munsell’, ‘R6’, ‘RColorBrewer’, ‘viridisLite’, ‘lifecycle’, ‘cli’, ‘crayon’, ‘fansi’, ‘pillar’, ‘pkgconfig’, ‘digest’, ‘glue’, ‘gtable’, ‘isoband’, ‘rlang’, ‘scales’, ‘tibble’, ‘withr’


  There is a binary version available but the source
  version is later:
     binary source needs_compilation
Rcpp  1.0.3  1.0.4              TRUE

and here it begins. Every package is installed correctly except Rcpp:

Warning in install.packages :

  installation of package ‘Rcpp’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\trebe\AppData\Local\Temp\Rtmp8Owq5O\downloaded_packages’

I tried different things to install the Rcpp from source, e.g.:

> install.packages("C:/Users/trebe/AppData/Local/Temp/Rtmp8Owq5O/downloaded_packages/Rcpp_1.0.4.tar.gz", type = "source")
Installing package into ‘C:/Users/trebe/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
  installation of package ‘C:/Users/trebe/AppData/Local/Temp/Rtmp8Owq5O/downloaded_packages/Rcpp_1.0.4.tar.gz’ had non-zero exit status

(neither the tar.gz nor the .zip file can be installed this way.)
as Rcpp 1.0.3 seems to be installed, I tried to move on:

> install.packages('devtools')
> library('devtools')
> devtools::install_github("jbisanz/qiime2R")
Downloading GitHub repo jbisanz/qiime2R@master
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                             
2: CRAN packages only              
3: None                            
4: Rcpp   (1.0.3   -> 1.0.4) [CRAN]
5: igraph (1.2.4.2 -> 1.2.5) [CRAN]

Enter one or more numbers, or an empty line to skip updates:

Fehler: Failed to install 'qiime2R' from GitHub:
  System command 'Rcmd.exe' failed, exit status: 10, stdout + stderr empty

okay, so igraph and Rcpp are not the latest versions, I tried to skip updates here as RStudio is not able to install those from source, but I get the above error. If I select updates (1) I get the following:

Fehler: Failed to install 'qiime2R' from GitHub:
  (konvertiert von Warnung) installation of package ‘Rcpp’ had non-zero exit status

It doesn't matter what I try, nothing seems to work. I'm working on this problem for 2 days now and didn't find a solution anywhere that works for me... Am I missing something? I also checked Rtools:

> find_rtools(T)
Scanning R CMD config CC...
cc_path:  
'' does not exist
Scanning path...
Scanning registry...
Found C:/Rtools for 3.5 
VERSION.txt
Rtools version 3.5.0.4 
[1] TRUE

I de- and reinstalled RStudio for multiple times now...
Can someone help me? Thanks in advance and have a good day!

Hi Sushiyie,

I encountered quite similar issue with DevTools as well. In my case, it occurs due to proxy issue with my office's laptop. Thus, I solve it by manually go to the github website and download it manually. Then, I extract the package within my local computer. Hope it helps.

Cheers,
Michaelino

Thank your for your answer!
I didn't try this yet, here is a code for anyone who has the same problem:

download.file("https://github.com/jbisanz/qiime2R/archive/master.zip", "source.zip")
unzip("source.zip")
install.packages("qiime2R-master", repos = NULL, type="source")

which unfortunately gave me an error message as well:

package qiime2r is not available (for r version 3.6.3)

But I am trying a different approach now, I can share the idea if anyone still struggles (like me):
you can change the .qza file-ending to a '.zip' ending and unzip this folder. inside is a .biom file which can be converted to a .tsv file and imported to R with read.table()

Thanks again! Cheers!
Hannah

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.