Error occurs while integrating qiime2 and R

I'm trying to use qiime2R but while running the following code from Tutorial: Integrating QIIME2 and R in R I'm getting error....

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

and the error showing is,

What am I missing here in the tutorial?

Hi @turtle,

This comes down to some issues with dependencies and its hard to troubleshoot just from that last message as every case is a bit different.
Can you try restarting your R sessions and manually installing the devtools package?

install.packages("devtools", dependencies = T)

If that is successful then you can just move on to installing qiime2R


If for some reason it is not successful, pay attention to the error message, it will likely name some packages that it couldn't install for some reason, at which point you'll want to manually try installing those one by one.

Let's start there and see how it goes!