From 17d99e31419e5388e8b6ec3e5f80aeff1685abc1 Mon Sep 17 00:00:00 2001 From: Jean-Michel Lord Date: Fri, 20 Sep 2024 12:50:10 -0400 Subject: [PATCH] Conda dependencies for other scripts Ran successfully for crocos in the USA. --- .../IUCN_redlist_historyAssesment.R | 6 +- .../IUCN_redlist_historyAssesment.yml | 16 +++++ scripts/RedListIndex/RedListIndex.yml | 71 ++++++++++++++++++- 3 files changed, 88 insertions(+), 5 deletions(-) diff --git a/scripts/IUCN_redlist_historyAssesment/IUCN_redlist_historyAssesment.R b/scripts/IUCN_redlist_historyAssesment/IUCN_redlist_historyAssesment.R index 7d79169b9..eb9cb0b86 100644 --- a/scripts/IUCN_redlist_historyAssesment/IUCN_redlist_historyAssesment.R +++ b/scripts/IUCN_redlist_historyAssesment/IUCN_redlist_historyAssesment.R @@ -2,9 +2,9 @@ #### Load required packages - libraries to run the script #### # Install necessary libraries - packages -packagesPrev<- installed.packages()[,"Package"] # Check and get a list of installed packages in this machine and R version -packagesNeed<- c("magrittr", "dplyr", "plyr", "ggplot2", "tibble", "pbapply", "rredlist", "plyr", "reshape2") # Define the list of required packages to run the script -new.packages <- packagesNeed[!(packagesNeed %in% packagesPrev)]; if(length(new.packages)) {install.packages(new.packages, binary=T, force=T, dependencies = F, repos= "https://packagemanager.posit.co/cran/__linux__/jammy/latest")} # Check and install required packages that are not previously installed +# packagesPrev<- installed.packages()[,"Package"] # Check and get a list of installed packages in this machine and R version +# packagesNeed<- c("magrittr", "dplyr", "plyr", "ggplot2", "tibble", "pbapply", "rredlist", "plyr", "reshape2") # Define the list of required packages to run the script +# new.packages <- packagesNeed[!(packagesNeed %in% packagesPrev)]; if(length(new.packages)) {install.packages(new.packages, binary=T, force=T, dependencies = F, repos= "https://packagemanager.posit.co/cran/__linux__/jammy/latest")} # Check and install required packages that are not previously installed # Load libraries packagesList<-list("magrittr", "rredlist", "ggplot2") # Explicitly list the required packages throughout the entire routine. Explicitly listing the required packages throughout the routine ensures that only the necessary packages are listed. Unlike 'packagesNeed', this list includes packages with functions that cannot be directly called using the '::' syntax. By using '::', specific functions or objects from a package can be accessed directly without loading the entire package. Loading an entire package involves loading all the functions and objects diff --git a/scripts/IUCN_redlist_historyAssesment/IUCN_redlist_historyAssesment.yml b/scripts/IUCN_redlist_historyAssesment/IUCN_redlist_historyAssesment.yml index fabf7b665..80aeb8819 100644 --- a/scripts/IUCN_redlist_historyAssesment/IUCN_redlist_historyAssesment.yml +++ b/scripts/IUCN_redlist_historyAssesment/IUCN_redlist_historyAssesment.yml @@ -7,6 +7,22 @@ author: - name: Victor Julio Rincon email: rincon-v@javeriana.edu.co external_link: https://github.com/GEO-BON/biab-2.0 +conda: + channels: + - r + - conda-forge + dependencies: + - r-magrittr + - r-data.table + - r-dplyr + - r-plyr + - r-ggplot2 + - r-tibble + - r-pbapply + - r-rredlist + - r-plyr + - r-reshape2 + inputs: species_data: label: Species data diff --git a/scripts/RedListIndex/RedListIndex.yml b/scripts/RedListIndex/RedListIndex.yml index 081b2184c..eca9c6d67 100644 --- a/scripts/RedListIndex/RedListIndex.yml +++ b/scripts/RedListIndex/RedListIndex.yml @@ -3,8 +3,75 @@ name: Red List Index description: "Estimates the Red List Index (RLI) for a group of species, reflecting trends in the overall extinction risk for that group." external_link: https://nrl.iucnredlist.org/assessment/red-list-index author: - - name: Maria Camila diaz (mdiaz@humboldt.org.co) - - name: Victor Julio Rincon (rincon-v@javeriana.edu.co) + - name: Maria Camila diaz + email: mdiaz@humboldt.org.co + - name: Victor Julio Rincon + email: rincon-v@javeriana.edu.co +conda: + channels: + - r + - conda-forge + dependencies: + - r-magrittr + - r-data.table + - r-reshape2 + - r-dplyr + - r-plyr + - r-ggplot2 + - r-tibble + - r-pbapply + - r-rredlist + - r-plyr + # - r-red (not in channels) + - r-gdistance + - r-BAT + - r-ape + - r-geometry + - r-magic + - r-hypervolume + - r-ks + - r-mclust + - r-mvtnorm + - r-pracma + - r-fastcluster + - r-pdist + - r-palmerpenguins + - r-caret + - r-recipes + - r-timeDate + - r-gower + - r-hardhat + - r-ipred + - r-prodlim + - r-lava + - r-future.apply + - r-future + - r-globals + - r-listenv + - r-parallelly + - r-ModelMetrics + - r-pROC + - r-nls2 + - r-proto + - r-vegan + - r-permute + - r-phytools + - r-combinat + - r-clusterGeneration + - r-DEoptim + - r-expm + - r-optimParallel + - r-phangorn + - r-fastmatch + - r-scatterplot3d + - r-predicts + - r-coda + - r-mnormt + - r-numDeriv + - r-quadprog + - r-dismo + - r-geosphere + inputs: history_assessment_data: label: History assessment data