I´m trying to install a specific package "pagoo", so I use the following command:
# Packages
packages <- c("ape","ggplot2","vegan","philentropy", "pagoo") # Specify your packages
# Install and libraries
package.check <- lapply(
packages,
FUN = function(x) {
if (!require(x, character.only = TRUE)) {
install.packages(x, dependencies = TRUE)
library(x, character.only = TRUE)
}
}
)
The last package is the problem: pagoo. When I tried to install it, there is an error:
Failed with error: ‘package ‘S4Vectors’ required by ‘pagoo’ could not be found’
Warning in install.packages :
dependencies ‘S4Vectors’, ‘Biostrings’, ‘GenomicRanges’, ‘BiocGenerics’, ‘DECIPHER’, ‘IRanges’ are not available
Show Traceback:
Error: package ‘S4Vectors’ required by ‘pagoo’ could not be found
5.
stop(gettextf("package %s required by %s could not be found",
sQuote(pkg), sQuote(pkgname)), call. = FALSE, domain = NA)
4.
.getRequiredPackages2(pkgInfo, quietly = quietly)
3.
library(x, character.only = TRUE)
2.
FUN(X[[i]], ...)
1.
lapply(packages, FUN = function(x) {
if (!require(x, character.only = TRUE)) {
install.packages(x, dependencies = TRUE)
library(x, character.only = TRUE) ...
So, first I tried to install pagoo from the source (which doesn´t work), then install S4Vectors from Bioconductor (which doesn´t work too). The following warning appears:
Warning messages:
1: In install.packages(...) :
installation of package ‘S4Vectors’ had non-zero exit status
2: In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘igraph’ had non-zero exit status
From github (devtools::install_github('iferres/pagoo')):
ERROR: dependencies ‘S4Vectors’, ‘Biostrings’, ‘GenomicRanges’ are not available for package ‘pagoo’
In case you need to know the Bioconductor version: 3.16 Now, I don´t know how to install this package. Any new ideas?
sessionInfo( )
R version 4.2.0 (2022-04-22)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.6
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] BiocGenerics_0.43.0 BiocManager_1.30.18
loaded via a namespace (and not attached):
[1] magrittr_2.0.3 splines_4.2.0 tidyselect_1.1.2 munsell_0.5.0 colorspace_2.0-3
[6] lattice_0.20-45 R6_2.5.1 rlang_1.0.2 fansi_1.0.3 dplyr_1.0.9
[11] tools_4.2.0 grid_4.2.0 gtable_0.3.0 nlme_3.1-157 mgcv_1.8-40
[16] utf8_1.2.2 cli_3.3.0 ellipsis_0.3.2 tibble_3.1.7 lifecycle_1.0.1
[21] crayon_1.5.1 Matrix_1.4-1 purrr_0.3.4 ggplot2_3.3.6 vctrs_0.4.1
[26] glue_1.6.2 compiler_4.2.0 pillar_1.7.0 generics_0.1.2 scales_1.2.0
[31] pkgconfig_2.0.3

To add to Lori's point,
BiocManager::installwill also install from GitHub repos, so there's no compelling reason to install packages using any other method.Well, thank you for your anwer, however using
doesn't works for me. Maybe I´m doing something wrong? Somebody recommends that I should downgrade my R version. What do you think?
Can you clarify? It doesn't work for you in what way?
As for downgrading R, that's probably not what you want to do.
I´m using Macbook with M1, where Bioconductor (current version doesn´t work), enter link description here I created a virtual environment with conda (r version 4.2.0) and then I used:
All were good, however, when I try to install pagoo:
I really don't understand why doesn't work even in a virtual environment.
I´m using Macbook with M1, where Bioconductor (current version doesn´t work), enter link description here I created a virtual environment with conda (r version 4.2.0) and then I used:
All was good, however, when I try to install pagoo:
I really don't understand why doesn't work even in a virtual environment.