Skip to content

Commit

Permalink
Updated packages other than ggplot2 due to clash with feasts
Browse files Browse the repository at this point in the history
  • Loading branch information
robjhyndman committed Feb 28, 2024
1 parent 28dd279 commit 0c3db38
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 30 deletions.
61 changes: 40 additions & 21 deletions renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
},
"DBI": {
"Package": "DBI",
"Version": "1.2.1",
"Version": "1.2.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"methods"
],
"Hash": "9b4993e98e0e19da84c168460c032fef"
"Hash": "164809cd72e1d5160b4cb3aa57f510fe"
},
"GGally": {
"Package": "GGally",
Expand Down Expand Up @@ -297,6 +297,23 @@
],
"Hash": "40415719b5a479b87949f3aa0aee737c"
},
"bookdown": {
"Package": "bookdown",
"Version": "0.37",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"htmltools",
"jquerylib",
"knitr",
"rmarkdown",
"tinytex",
"xfun",
"yaml"
],
"Hash": "b1b1c3be5c75309f6107726fa58ee20c"
},
"brew": {
"Package": "brew",
"Version": "1.0-10",
Expand Down Expand Up @@ -380,7 +397,7 @@
},
"callr": {
"Package": "callr",
"Version": "3.7.3",
"Version": "3.7.5",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -389,7 +406,7 @@
"processx",
"utils"
],
"Hash": "9b2191ede20fa29828139b9900922e51"
"Hash": "9f0e4fae4963ba775a5e5c520838c87b"
},
"cellranger": {
"Package": "cellranger",
Expand Down Expand Up @@ -997,7 +1014,7 @@
},
"ggforce": {
"Package": "ggforce",
"Version": "0.4.1",
"Version": "0.4.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -1022,7 +1039,7 @@
"vctrs",
"withr"
],
"Hash": "a06503f54e227f79b45a72df2946a2d2"
"Hash": "384b388bd9155468d2c851846ee69f9f"
},
"ggplot2": {
"Package": "ggplot2",
Expand Down Expand Up @@ -1479,15 +1496,15 @@
},
"magick": {
"Package": "magick",
"Version": "2.8.2",
"Version": "2.8.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"Rcpp",
"curl",
"magrittr"
],
"Hash": "87da0066dd0d7b1a95c461abfbf10411"
"Hash": "3f6bcbb8a0c1c9365b2f02d5d04ad7bc"
},
"magrittr": {
"Package": "magrittr",
Expand Down Expand Up @@ -1573,19 +1590,20 @@
"Version": "0.1.0.9001",
"Source": "GitHub",
"RemoteType": "github",
"RemoteHost": "api.github.com",
"RemoteRepo": "moodlequiz",
"RemoteUsername": "numbats",
"RemoteRepo": "moodlequiz",
"RemoteRef": "HEAD",
"RemoteSha": "5511e23143bc7a7a6b5d2534cbc1e9a31a78c29d",
"RemoteSha": "db21949ffb70c961fec57ba31c898b37f90b46e9",
"RemoteHost": "api.github.com",
"Requirements": [
"bookdown",
"knitr",
"rlang",
"rmarkdown",
"xfun",
"yaml"
],
"Hash": "65678622ed4dfb9759683d885b537c8c"
"Hash": "c827d91a37591eec6d133effab23a484"
},
"munsell": {
"Package": "munsell",
Expand Down Expand Up @@ -1951,13 +1969,13 @@
},
"renv": {
"Package": "renv",
"Version": "1.0.3",
"Version": "1.0.4",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"utils"
],
"Hash": "41b847654f567341725473431dd0d5ab"
"Hash": "11abaf7c540ff33f94514d50f929bfd1"
},
"reprex": {
"Package": "reprex",
Expand Down Expand Up @@ -2066,7 +2084,7 @@
"Package": "rstudioapi",
"Version": "0.15.0",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "https://packagemanager.rstudio.com/all/__linux__/focal/latest",
"Hash": "5564500e25cffad9e22244ced1379887"
},
"rvest": {
Expand Down Expand Up @@ -2426,7 +2444,7 @@
},
"transformr": {
"Package": "transformr",
"Version": "0.1.4",
"Version": "0.1.5",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -2437,7 +2455,7 @@
"tweenr",
"vctrs"
],
"Hash": "d2ddc0cd58a322008c7c60ee495a7e18"
"Hash": "584eda9966ed571b3adc75e338116147"
},
"tseries": {
"Package": "tseries",
Expand Down Expand Up @@ -2493,7 +2511,7 @@
},
"tweenr": {
"Package": "tweenr",
"Version": "2.0.2",
"Version": "2.0.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -2504,7 +2522,7 @@
"rlang",
"vctrs"
],
"Hash": "c16efcef4c72d3bff5e65031f3f1f841"
"Hash": "82fac2b73e6a1f3874fc000aaf96d8bc"
},
"tzdb": {
"Package": "tzdb",
Expand Down Expand Up @@ -2646,14 +2664,15 @@
},
"xfun": {
"Package": "xfun",
"Version": "0.41",
"Version": "0.42",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"grDevices",
"stats",
"tools"
],
"Hash": "460a5e0fe46a80ef87424ad216028014"
"Hash": "fd1349170df31f7a10bd98b0189e85af"
},
"xml2": {
"Package": "xml2",
Expand Down
39 changes: 30 additions & 9 deletions renv/activate.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local({

# the requested version of renv
version <- "1.0.3"
version <- "1.0.4"
attr(version, "sha") <- NULL

# the project directory
Expand Down Expand Up @@ -31,6 +31,14 @@ local({
if (!is.null(override))
return(override)

# if we're being run in a context where R_LIBS is already set,
# don't load -- presumably we're being run as a sub-process and
# the parent process has already set up library paths for us
rcmd <- Sys.getenv("R_CMD", unset = NA)
rlibs <- Sys.getenv("R_LIBS", unset = NA)
if (!is.na(rlibs) && !is.na(rcmd))
return(FALSE)

# next, check environment variables
# TODO: prefer using the configuration one in the future
envvars <- c(
Expand All @@ -50,9 +58,22 @@ local({

})

if (!enabled)
# bail if we're not enabled
if (!enabled) {

# if we're not enabled, we might still need to manually load
# the user profile here
profile <- Sys.getenv("R_PROFILE_USER", unset = "~/.Rprofile")
if (file.exists(profile)) {
cfg <- Sys.getenv("RENV_CONFIG_USER_PROFILE", unset = "TRUE")
if (tolower(cfg) %in% c("true", "t", "1"))
sys.source(profile, envir = globalenv())
}

return(FALSE)

}

# avoid recursion
if (identical(getOption("renv.autoloader.running"), TRUE)) {
warning("ignoring recursive attempt to run renv autoloader")
Expand Down Expand Up @@ -1041,7 +1062,7 @@ local({
# if jsonlite is loaded, use that instead
if ("jsonlite" %in% loadedNamespaces()) {

json <- catch(renv_json_read_jsonlite(file, text))
json <- tryCatch(renv_json_read_jsonlite(file, text), error = identity)
if (!inherits(json, "error"))
return(json)

Expand All @@ -1050,7 +1071,7 @@ local({
}

# otherwise, fall back to the default JSON reader
json <- catch(renv_json_read_default(file, text))
json <- tryCatch(renv_json_read_default(file, text), error = identity)
if (!inherits(json, "error"))
return(json)

Expand All @@ -1063,14 +1084,14 @@ local({
}

renv_json_read_jsonlite <- function(file = NULL, text = NULL) {
text <- paste(text %||% read(file), collapse = "\n")
text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n")
jsonlite::fromJSON(txt = text, simplifyVector = FALSE)
}

renv_json_read_default <- function(file = NULL, text = NULL) {

# find strings in the JSON
text <- paste(text %||% read(file), collapse = "\n")
text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n")
pattern <- '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
locs <- gregexpr(pattern, text, perl = TRUE)[[1]]

Expand Down Expand Up @@ -1118,14 +1139,14 @@ local({
map <- as.list(map)

# remap strings in object
remapped <- renv_json_remap(json, map)
remapped <- renv_json_read_remap(json, map)

# evaluate
eval(remapped, envir = baseenv())

}

renv_json_remap <- function(json, map) {
renv_json_read_remap <- function(json, map) {

# fix names
if (!is.null(names(json))) {
Expand All @@ -1152,7 +1173,7 @@ local({
# recurse
if (is.recursive(json)) {
for (i in seq_along(json)) {
json[i] <- list(renv_json_remap(json[[i]], map))
json[i] <- list(renv_json_read_remap(json[[i]], map))
}
}

Expand Down

0 comments on commit 0c3db38

Please sign in to comment.