generated from nmfs-opensci/NOAA-quarto-simple
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from Bai-Li-NOAA/main
Add setup.qmd file to facilitate the management of all required packages in the repository's code
- Loading branch information
Showing
8 changed files
with
48 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
```{r} | ||
#| warning: false | ||
#| label: package-installation | ||
# Names of required packages | ||
packages <- c("dplyr", "tidyr", "ggplot2", "TMB", "reshape2", "here", "remotes") | ||
# Install packages not yet installed | ||
installed_packages <- packages %in% rownames(installed.packages()) | ||
if (any(installed_packages == FALSE)) { | ||
install.packages(packages[!installed_packages], repos = "http://cran.us.r-project.org") | ||
} | ||
remotes::install_github("kaskr/TMB_contrib_R/TMBhelper") | ||
remotes::install_github("NOAA-FIMS/FIMS") | ||
# Load packages | ||
invisible(lapply(packages, library, character.only = TRUE)) | ||
library(FIMS) | ||
library(TMBhelper) | ||
R_version <- version$version.string | ||
TMB_version <- packageDescription("TMB")$Version | ||
FIMS_commit <- substr(packageDescription("FIMS")$GithubSHA1, 1, 7) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters