Skip to content

Commit 9acaa72

Browse files
committed
added missing package install
1 parent 24d88d1 commit 9acaa72

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

install_R_packages.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
library(devtools)
2-
31
# functions to install a package if it's missing
42
install_if_missing <- function(package) {
53
if (!requireNamespace(package, quietly = TRUE)) {
64
install.packages(package)
75
}
86
}
7+
8+
install_if_missing("devtools")
9+
910
install_github_if_missing <- function(package, repo) {
1011
if (!requireNamespace(package, quietly = TRUE)) {
1112
devtools::install_github(repo)
@@ -20,6 +21,7 @@ packages <- c(
2021
"devtools",
2122
"dplyr",
2223
"ggplot2",
24+
"ggplotify",
2325
"ggpointdensity",
2426
"ggprism",
2527
"ggpubr",

0 commit comments

Comments
 (0)