Commit 560b3cc5 authored by domingue's avatar domingue
Browse files

Automatic loading of project renv

parent 9318b70a
Pipeline #1736 failed with stage
in 43 minutes and 51 seconds
Package: corescf
Title: Collection of Useful CSF Functions
Description: Collection of useful custom functions as part of the CSF workflows.
Version: 0.6.1.0000
Version: 0.7.0.0000
Authors@R: c(
person(given = "António",
family = "Domingues",
......
......@@ -7,6 +7,14 @@
gsubfn.engine = "R"
)
load_renv <- function() {
if (Sys.getenv("PRJ_SCRIPTS") != "") {
message("Project variables were detected. Loading renv")
renv::load(project = Sys.getenv("PRJ_SCRIPTS"))
}
}
## load core packages
load_pack("purrr")
load_pack("tibble")
......@@ -38,14 +46,14 @@ install_package("docopt")
install_package("session")
## convenient functions to add add syntax to the terminal
# colourised R docs in the terminal
if (!require("rdoc", character.only=TRUE)){
# colourised R docs in the terminal
if (!require("rdoc", character.only = TRUE)) {
devtools::install_github("mdequeljoe/rdoc")
}
rdoc::use_rdoc()
# Syntax highlight R code in the terminal
if (!require("prettycode", character.only=TRUE)){
# Syntax highlight R code in the terminal
if (!require("prettycode", character.only = TRUE)) {
install.packages("prettycode")
}
prettycode::prettycode()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment