You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2021/08/06 21:35:11 UTC
[arrow-cookbook] branch main updated: #17 no pacman (#18)
This is an automated email from the ASF dual-hosted git repository.
westonpace pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-cookbook.git
The following commit(s) were added to refs/heads/main by this push:
new 3fff4ec #17 no pacman (#18)
3fff4ec is described below
commit 3fff4ecdb6daf58652d02d2de591c398bf4f9c12
Author: Nic <th...@gmail.com>
AuthorDate: Fri Aug 6 21:35:04 2021 +0000
#17 no pacman (#18)
* remove redundant dependencies
* another redundant dependency
---
r/content/index.Rmd | 1 -
r/scripts/install_dependencies.R | 13 ++++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/r/content/index.Rmd b/r/content/index.Rmd
index db3b5c8..39711b8 100644
--- a/r/content/index.Rmd
+++ b/r/content/index.Rmd
@@ -5,7 +5,6 @@ params:
---
```{r setup, include = FALSE}
-testrmd::init()
library(arrow)
library(testthat)
library(dplyr)
diff --git a/r/scripts/install_dependencies.R b/r/scripts/install_dependencies.R
index a6224cf..d7aef73 100644
--- a/r/scripts/install_dependencies.R
+++ b/r/scripts/install_dependencies.R
@@ -18,9 +18,16 @@ get_installed_version <- function(pkg){
}
# install dependencies if not installed
-if (!require("pacman")) install.packages("pacman")
-pacman::p_load("testthat", "bookdown", "xfun", "knitr", "purrr", "remotes", "dplyr")
-pacman::p_load_gh("rmflight/testrmd")
+load_package <- function(pkg_name){
+ if (!require(pkg_name, character.only = TRUE)) {
+ install.packages(pkg_name)
+ }
+ library(pkg_name, character.only = TRUE)
+}
+
+dependencies <- c("testthat", "bookdown", "knitr", "purrr", "remotes", "dplyr")
+
+lapply(dependencies, load_package)
# check version of Arrow installed, and install correct one
if (!inherits(build_version, "package_version") && build_version == "latest") {