Skip to content

Commit

Permalink
Conda dependencies for other scripts
Browse files Browse the repository at this point in the history
Ran successfully for crocos in the USA.
  • Loading branch information
jmlord committed Sep 20, 2024
1 parent a7907b0 commit 17d99e3
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ author:
- name: Victor Julio Rincon
email: [email protected]
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
Expand Down
71 changes: 69 additions & 2 deletions scripts/RedListIndex/RedListIndex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ([email protected])
- name: Victor Julio Rincon ([email protected])
- name: Maria Camila diaz
email: [email protected]
- name: Victor Julio Rincon
email: [email protected]
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
Expand Down

0 comments on commit 17d99e3

Please sign in to comment.