qiime2R installation issue

Dear @jbisanz,

I have a problem with the installation of package. Namely, when I try to install it using "devtools::install_github("jbisanz/qiime2R" I get the following error:

WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools custom from RTools: Toolchains for building R and R packages from source on Windows.
Skipping install of 'qiime2R' from a github remote, the SHA1 (4c2abcd1) has not changed since last install.
Use force = TRUE to force installation

Then I try to install Rtools, as recommended by the previous output, and I get the following result:

install.packages("rtools")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/u0114295/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘rtools’ is not available (for R version 3.6.1)

so it seems I cannot install rtools because the last version of it was for R 3.5.

Is there a way around this issue?

Thanks a lot for your help!!!!

Cheers,
Pablo

1 Like

It would appear that rtools is not a r package but a separate piece of software that can be installed outside of R. This post may be helpful for using rtools3.5 with r 3.6.1: https://community.rstudio.com/t/errors-in-rtool-installations/35689

hello Jordan,

is qiime2R compatible with R 4.0? I am getting the following on trying to install. Also fails to install in RStudio. Thanks, Mircea

Hi Mircea,
Yes it is. I’m wondering if this could be related to a previous version of R’s install of readr and/or Rcpp. Could you try reinstalling the tidyverse and see if that makes a difference?

1 Like

I am also having a same problem where I cannot install Qiime2R and it says it is not compatible with R.4.0 which I just updated…any advice?

Could you try reinstalling the tidyverse or Rcpp from CRAN and see if you still have issues?

I reinstalled after i updated my R ver to 4.0 and the msg was like

devtools::install(“qiime2R-master”)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘cachem’
install.packages(“cachem”)

Try installing straight from github, hopefully all of the dependencies will be handled. Please post any error message that happens when you do that.

devtools::install_gihub("jbisanz/qiime2R")

I got this error?

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘cachem’

Hi, I’m also having install issues.

Error: package or namespace load failed for ‘qiime2R’ in library.dynam(lib, package, package.lib):
DLL ‘tidyr’ not found: maybe not installed for this architecture?

I have R v4.0.3, Tidyverse, tidyr and Rcpp all installed and up to date so I do not understand why qiime2r won’t install.

Any suggestions?

------>
Never mind I fixed it… it was a broken install of tidyr which couldn’t be removed
I fixed it by changing the name of the broken folder in R/win-library/4.0 (because it refused to be deleted, even after being uninstalled). The reinstall of tidyr fixed the install problems

Dear @jbisanz,

I am trying to install qiime2R but I am getting the following message:

if (!requireNamespace("devtools", quietly = TRUE)){install.packages("devtools")}devtools::install_github("jbisanz/qiime2R")

Skipping install of 'qiime2R' from a github remote, the SHA1 (2a3cee18) has not changed since last install.
Use force = TRUE to force installation

Could you help me, please?

Thank you so much

This means it is already installed and up to date and won't reinstall because your version is not different from the one on github.

Thank you, Jordan. I also got these error messages when I tried one of the commands from the tutorial (all files contain 176 samples).

metadata<-read_q2metadata("metadata.tsv")
uwunifrac<-read_qza("unweighted_unifrac_pcoa_results.qza")
shannon<-read_qza("shannon_vector.qza")$data %>% rownames_to_column("SampleID")

uwunifrac$data$Vectors %>%
select(SampleID, PC1, PC2) %>%
left_join(metadata) %>%
left_join(shannon) %>%
ggplot(aes(x=PC1, y=PC2, color=Sample_type, shape=Blocking_Primer, size=shannon)) +
geom_point(alpha=0.5) +
theme_q2r() +
scale_shape_manual(values=c(16,1), name="Blocking_Primer") +
scale_size_continuous(name="Shannon Diversity") +
scale_color_discrete(name="Sample_type")

Error: Aesthetics must be either length 1 or the same as the data (176): size
Run rlang::last_error() to see where the error occurred.

<error/rlang_error>
Aesthetics must be either length 1 or the same as the data (176): size
Backtrace:

  1. ggplot2::ggsave("PCoA.pdf", height = 4, width = 5, device = "pdf")
  2. ggplot2:::grid.draw.ggplot(plot)
  3. ggplot2:::print.ggplot(x)
  4. ggplot2:::ggplot_build.ggplot(x)
  5. ggplot2:::by_layer(function(l, d) l$compute_aesthetics(d, plot))
  6. ggplot2:::f(l = layers[[i]], d = data[[i]])
  7. l$compute_aesthetics(d, plot)
  8. ggplot2:::f(..., self = self)
  9. ggplot2:::check_aesthetics(evaled, n)

Do you know what the mistake is? thank you

Hey - I've just tried this command, but I am getting the following error:

devtools::install_gihub("jbisanz/qiime2R")
Error: 'install_gihub' is not an exported object from 'namespace:devtools'

Any ideas?

Hi @16sIceland - I'm not the developer of qiime2r, but it looks like you have a typo in your command, you're missing the "t" in "github".

1 Like

Gold star for careful reading - that is indeed the problem!

3 Likes

An off-topic reply has been split into a new topic: Installing Qiime2-r

Please keep replies on-topic in the future.