From 903e7b1f5367c892cc2576f1671f22ab3a78bcc3 Mon Sep 17 00:00:00 2001 From: Rich Bielby Date: Mon, 15 Apr 2024 16:20:49 +0100 Subject: [PATCH 1/3] Added sandardised SEN fields --- statistics-production/ud.qmd | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/statistics-production/ud.qmd b/statistics-production/ud.qmd index 91a2768..4a56642 100644 --- a/statistics-production/ud.qmd +++ b/statistics-production/ud.qmd @@ -815,6 +815,48 @@ navigate and understand our statistics. In the EES context, harmonisation will a methods of interacting with our data platform such as automated data retrieval for dashboards and other secondary statistics services, whilst also helping with performance and cost effectiveness of the EES platform. +--- + +## Special Educational Needs + +Special educational needs data uploaded to Explore Education Statistics is expected to conform closely to the [School Census data guidance](https://www.gov.uk/guidance/complete-the-school-census/find-a-school-census-code). + +Top level fields are provided by **sen_status** and **sen_provision** as follows: + +| sen_status | sen_provision | +| ---------- | --------------| +| Any special educational need | Education, health and care plan | +| | SEN support / SEN without an EHC plan | +| No identified special educational need | No SEN provision | +| Total | Total | + +If both are provided, then **sen_status** should be listed as the filter_grouping_column of **sen_provision**. + +Individual needs can be provided using **sen_primary_need** and **sen_secondary_need**. These are as follows: + +| sen_primary_need | +| ---------------- | +| Autistic spectrum disorder | +| Hearing impairment | +| Not reported | +| Moderate learning difficulty | +| Multi-sensory impairment | +| Other difficulty or disability | +| Physical disability | +| Profound and multiple learning difficulty | +| SEN support but no specialist assessment of type of need | +| Severe learning difficulty | +| Social, emotional and mental health | +| Specific learning difficulty | +| Speech, language and communication needs | +| Vision impairment | +| No primary need | +| Total | + +The options for **sen_secondary_need** are the same as for **sen_primary_need**, except for **No primary need** is replaced by **No secondary need**. + +If using **breakdown_topic** and **breakdown** insead of individual columns, then he appropriate entries for **breakdown_topic** are SEN status, SEN provision, SEN primary need and SEN secondary need. + --- ## Sex and gender From 19b861476cfe43b10086837230fda13d45606826 Mon Sep 17 00:00:00 2001 From: Rich Bielby Date: Mon, 15 Apr 2024 16:30:02 +0100 Subject: [PATCH 2/3] Added Unknown caegory to SEN primary need --- statistics-production/ud.qmd | 1 + 1 file changed, 1 insertion(+) diff --git a/statistics-production/ud.qmd b/statistics-production/ud.qmd index 4a56642..d7909e4 100644 --- a/statistics-production/ud.qmd +++ b/statistics-production/ud.qmd @@ -850,6 +850,7 @@ Individual needs can be provided using **sen_primary_need** and **sen_secondary_ | Specific learning difficulty | | Speech, language and communication needs | | Vision impairment | +| Unknown | | No primary need | | Total | From 66122ada16c4df0f652f371500a562eb919b4c33 Mon Sep 17 00:00:00 2001 From: Rich Bielby Date: Tue, 16 Apr 2024 17:05:33 +0100 Subject: [PATCH 3/3] Typo fix --- renv.lock | 171 ++++++++++++++--------------------- renv/activate.R | 147 +++++++++++++++++++----------- statistics-production/ud.qmd | 2 +- 3 files changed, 161 insertions(+), 159 deletions(-) diff --git a/renv.lock b/renv.lock index b13865c..c9de68f 100644 --- a/renv.lock +++ b/renv.lock @@ -1,6 +1,6 @@ { "R": { - "Version": "4.3.2", + "Version": "4.3.3", "Repositories": [ { "Name": "CRAN", @@ -11,7 +11,7 @@ "Packages": { "MASS": { "Package": "MASS", - "Version": "7.3-60", + "Version": "7.3-60.0.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -22,15 +22,16 @@ "stats", "utils" ], - "Hash": "a56a6365b3fa73293ea8d084be0d9bb0" + "Hash": "b765b28387acc8ec9e9c1530713cb19c" }, "Matrix": { "Package": "Matrix", - "Version": "1.5-4.1", + "Version": "1.6-5", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", + "grDevices", "graphics", "grid", "lattice", @@ -38,7 +39,7 @@ "stats", "utils" ], - "Hash": "38082d362d317745fb932e13956dccbb" + "Hash": "8c7115cd3a0e048bda2a7cd110549f7a" }, "R6": { "Package": "R6", @@ -83,23 +84,25 @@ }, "bslib": { "Package": "bslib", - "Version": "0.5.1", + "Version": "0.7.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "base64enc", "cachem", + "fastmap", "grDevices", "htmltools", "jquerylib", "jsonlite", + "lifecycle", "memoise", "mime", "rlang", "sass" ], - "Hash": "283015ddfbb9d7bf15ea9f0b5698f0d9" + "Hash": "8644cc53f43828f19133548195d7e59e" }, "cachem": { "Package": "cachem", @@ -126,14 +129,14 @@ }, "cli": { "Package": "cli", - "Version": "3.6.1", + "Version": "3.6.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "89e6d8219950eac806ae0c489052048a" + "Hash": "1216ac65ac55ec0058a6f75d7ca0fd52" }, "colorspace": { "Package": "colorspace", @@ -151,13 +154,13 @@ }, "cpp11": { "Package": "cpp11", - "Version": "0.4.6", + "Version": "0.4.7", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R" ], - "Hash": "707fae4bbf73697ec8d85f9d7076c061" + "Hash": "5a295d7d963cc5035284dcdbaf334f4e" }, "crayon": { "Package": "crayon", @@ -173,40 +176,29 @@ }, "digest": { "Package": "digest", - "Version": "0.6.33", + "Version": "0.6.35", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "utils" ], - "Hash": "b18a9cf3c003977b0cc49d5e76ebe48d" - }, - "ellipsis": { - "Package": "ellipsis", - "Version": "0.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "rlang" - ], - "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" + "Hash": "698ece7ba5a4fa4559e3d537e7ec3d31" }, "evaluate": { "Package": "evaluate", - "Version": "0.22", + "Version": "0.23", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "66f39c7a21e03c4dcb2c2d21d738d603" + "Hash": "daf4a1246be12c1fa8c7705a0935c1a0" }, "fansi": { "Package": "fansi", - "Version": "1.0.4", + "Version": "1.0.6", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -214,7 +206,7 @@ "grDevices", "utils" ], - "Hash": "1d9e7ad3c8312a192dea7d3db0274fde" + "Hash": "962174cf2aeb5b9eea581522286a911f" }, "farver": { "Package": "farver", @@ -255,11 +247,12 @@ }, "ggiraph": { "Package": "ggiraph", - "Version": "0.8.8", + "Version": "0.8.9", "Source": "Repository", "Repository": "RSPM", "Requirements": [ "Rcpp", + "cli", "ggplot2", "grid", "htmltools", @@ -271,13 +264,13 @@ "uuid", "vctrs" ], - "Hash": "120f23937aa0311367eb1d94731660f7" + "Hash": "50a51e9be10ba75fc43ee7fb21c18af0" }, "ggplot2": { "Package": "ggplot2", - "Version": "3.4.4", + "Version": "3.5.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Requirements": [ "MASS", "R", @@ -296,18 +289,18 @@ "vctrs", "withr" ], - "Hash": "313d31eff2274ecf4c1d3581db7241f9" + "Hash": "52ef83f93f74833007f193b2d4c159a2" }, "glue": { "Package": "glue", - "Version": "1.6.2", + "Version": "1.7.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e" + "Hash": "e0b3a53876554bd45879e596cdb10a52" }, "gtable": { "Package": "gtable", @@ -351,20 +344,19 @@ }, "htmltools": { "Package": "htmltools", - "Version": "0.5.7", + "Version": "0.5.8.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "base64enc", "digest", - "ellipsis", "fastmap", "grDevices", "rlang", "utils" ], - "Hash": "2d7b3857980e0e0d0a1fd6f11928ab0f" + "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" }, "htmlwidgets": { "Package": "htmlwidgets", @@ -404,17 +396,17 @@ }, "jsonlite": { "Package": "jsonlite", - "Version": "1.8.7", + "Version": "1.8.8", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "methods" ], - "Hash": "266a20443ca13c65688b2116d5220f76" + "Hash": "e1b9c55281c5adc4dd113652d9e26768" }, "knitr": { "Package": "knitr", - "Version": "1.44", + "Version": "1.46", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -426,7 +418,7 @@ "xfun", "yaml" ], - "Hash": "60885b9f746c9dfaef110d070b5f7dc0" + "Hash": "6e008ab1d696a5283c79765fa7b56b47" }, "labeling": { "Package": "labeling", @@ -441,7 +433,7 @@ }, "lattice": { "Package": "lattice", - "Version": "0.21-8", + "Version": "0.22-6", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -452,11 +444,11 @@ "stats", "utils" ], - "Hash": "0b8a6d63c8770f02a8b5635f3c431e6b" + "Hash": "cc5ac1ba4c238c7ca9fa6a87ca11a7e2" }, "lifecycle": { "Package": "lifecycle", - "Version": "1.0.3", + "Version": "1.0.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -465,7 +457,7 @@ "glue", "rlang" ], - "Hash": "001cecbeac1cff9301bdc3775ee46a86" + "Hash": "b8552d117e1b808b09a832f589b79035" }, "magrittr": { "Package": "magrittr", @@ -490,7 +482,7 @@ }, "mgcv": { "Package": "mgcv", - "Version": "1.8-42", + "Version": "1.9-1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -503,7 +495,7 @@ "stats", "utils" ], - "Hash": "3460beba7ccc8946249ba35327ba902a" + "Hash": "110ee9d83b496279960e162ac97764ce" }, "mime": { "Package": "mime", @@ -517,18 +509,18 @@ }, "munsell": { "Package": "munsell", - "Version": "0.5.0", + "Version": "0.5.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "colorspace", "methods" ], - "Hash": "6dfe8bf774944bd5595785e3229d8771" + "Hash": "4fd8900853b746af55b81fda99da7695" }, "nlme": { "Package": "nlme", - "Version": "3.1-162", + "Version": "3.1-164", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -538,7 +530,7 @@ "stats", "utils" ], - "Hash": "0984ce8da8da9ead8643c5cbbb60f83e" + "Hash": "a623a2239e642806158bc4dc3f51565d" }, "pillar": { "Package": "pillar", @@ -579,16 +571,17 @@ }, "progress": { "Package": "progress", - "Version": "1.2.2", + "Version": "1.2.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ + "R", "R6", "crayon", "hms", "prettyunits" ], - "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" + "Hash": "f4625e061cb2865f111b47ff163a5ca6" }, "purrr": { "Package": "purrr", @@ -639,28 +632,28 @@ }, "renv": { "Package": "renv", - "Version": "1.0.0", + "Version": "1.0.7", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "utils" ], - "Hash": "c321cd99d56443dbffd1c9e673c0c1a2" + "Hash": "397b7b2a265bc5a7a06852524dabae20" }, "rlang": { "Package": "rlang", - "Version": "1.1.1", + "Version": "1.1.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "a85c767b55f0bf9b7ad16c6d7baee5bb" + "Hash": "42548638fae05fd9a9b5f3f437fbbbe2" }, "rmarkdown": { "Package": "rmarkdown", - "Version": "2.25", + "Version": "2.26", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -673,18 +666,17 @@ "jsonlite", "knitr", "methods", - "stringr", "tinytex", "tools", "utils", "xfun", "yaml" ], - "Hash": "d65e35823c817f09f4de424fcdfa812a" + "Hash": "9b148e7f95d33aac01f31282d49e4f44" }, "sass": { "Package": "sass", - "Version": "0.4.7", + "Version": "0.4.9", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -694,7 +686,7 @@ "rappdirs", "rlang" ], - "Hash": "6bd4d33b50ff927191ec9acbf52fd056" + "Hash": "d53dbfddf695303ea4ad66f86e99b95d" }, "scales": { "Package": "scales", @@ -716,46 +708,16 @@ ], "Hash": "c19df082ba346b0ffa6f833e92de34d1" }, - "stringi": { - "Package": "stringi", - "Version": "1.7.12", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "stats", - "tools", - "utils" - ], - "Hash": "ca8bd84263c77310739d2cf64d84d7c9" - }, - "stringr": { - "Package": "stringr", - "Version": "1.5.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "magrittr", - "rlang", - "stringi", - "vctrs" - ], - "Hash": "671a4d384ae9d32fc47a14e98bfa3dc8" - }, "systemfonts": { "Package": "systemfonts", - "Version": "1.0.5", + "Version": "1.0.6", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "cpp11" ], - "Hash": "15b594369e70b975ba9f064295983499" + "Hash": "6d538cff441f0f1f36db2209ac7495ac" }, "tibble": { "Package": "tibble", @@ -778,23 +740,23 @@ }, "tinytex": { "Package": "tinytex", - "Version": "0.47", + "Version": "0.50", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "xfun" ], - "Hash": "8d4ccb733843e513c1c1cdd66a759f0d" + "Hash": "be7a76845222ad20adb761f462eed3ea" }, "utf8": { "Package": "utf8", - "Version": "1.2.3", + "Version": "1.2.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R" ], - "Hash": "1fe17157424bb09c48a8b3b550c753bc" + "Hash": "62b65c52671e6665f803ff02954446e9" }, "uuid": { "Package": "uuid", @@ -844,21 +806,22 @@ }, "xfun": { "Package": "xfun", - "Version": "0.40", + "Version": "0.43", "Source": "Repository", "Repository": "CRAN", "Requirements": [ + "grDevices", "stats", "tools" ], - "Hash": "be07d23211245fc7d4209f54c4e4ffc8" + "Hash": "ab6371d8653ce5f2f9290f4ec7b42a8e" }, "yaml": { "Package": "yaml", - "Version": "2.3.7", + "Version": "2.3.8", "Source": "Repository", "Repository": "CRAN", - "Hash": "0d0056cc5383fbc240ccd0cb584bf436" + "Hash": "29240487a071f535f5e5d5a323b7afbd" } } } diff --git a/renv/activate.R b/renv/activate.R index cc742fc..d13f993 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,11 +2,28 @@ local({ # the requested version of renv - version <- "1.0.0" + version <- "1.0.7" attr(version, "sha") <- NULL # the project directory - project <- getwd() + project <- Sys.getenv("RENV_PROJECT") + if (!nzchar(project)) + project <- getwd() + + # use start-up diagnostics if enabled + diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE") + if (diagnostics) { + start <- Sys.time() + profile <- tempfile("renv-startup-", fileext = ".Rprof") + utils::Rprof(profile) + on.exit({ + utils::Rprof(NULL) + elapsed <- signif(difftime(Sys.time(), start, units = "auto"), digits = 2L) + writeLines(sprintf("- renv took %s to run the autoloader.", format(elapsed))) + writeLines(sprintf("- Profile: %s", profile)) + print(utils::summaryRprof(profile)) + }, add = TRUE) + } # figure out whether the autoloader is enabled enabled <- local({ @@ -16,6 +33,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( @@ -35,9 +60,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") @@ -93,6 +131,21 @@ local({ } + heredoc <- function(text, leave = 0) { + + # remove leading, trailing whitespace + trimmed <- gsub("^\\s*\\n|\\n\\s*$", "", text) + + # split into lines + lines <- strsplit(trimmed, "\n", fixed = TRUE)[[1L]] + + # compute common indent + indent <- regexpr("[^[:space:]]", lines) + common <- min(setdiff(indent, -1L)) - leave + paste(substring(lines, common), collapse = "\n") + + } + startswith <- function(string, prefix) { substring(string, 1, nchar(prefix)) == prefix } @@ -504,7 +557,7 @@ local({ # open the bundle for reading # We use gzcon for everything because (from ?gzcon) - # > Reading from a connection which does not supply a ‘gzip’ magic + # > Reading from a connection which does not supply a 'gzip' magic # > header is equivalent to reading from the original connection conn <- gzcon(file(bundle, open = "rb", raw = TRUE)) on.exit(close(conn)) @@ -595,6 +648,9 @@ local({ # if the user has requested an automatic prefix, generate it auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA) + if (is.na(auto) && getRversion() >= "4.4.0") + auto <- "TRUE" + if (auto %in% c("TRUE", "True", "true", "1")) return(renv_bootstrap_platform_prefix_auto()) @@ -767,10 +823,12 @@ local({ renv_bootstrap_validate_version <- function(version, description = NULL) { # resolve description file - description <- description %||% { - path <- getNamespaceInfo("renv", "path") - packageDescription("renv", lib.loc = dirname(path)) - } + # + # avoid passing lib.loc to `packageDescription()` below, since R will + # use the loaded version of the package by default anyhow. note that + # this function should only be called after 'renv' is loaded + # https://github.com/rstudio/renv/issues/1625 + description <- description %||% packageDescription("renv") # check whether requested version 'version' matches loaded version of renv sha <- attr(version, "sha", exact = TRUE) @@ -784,24 +842,23 @@ local({ # the loaded version of renv doesn't match the requested version; # give the user instructions on how to proceed - remote <- if (!is.null(description[["RemoteSha"]])) { + dev <- identical(description[["RemoteType"]], "github") + remote <- if (dev) paste("rstudio/renv", description[["RemoteSha"]], sep = "@") - } else { + else paste("renv", description[["Version"]], sep = "@") - } # display both loaded version + sha if available friendly <- renv_bootstrap_version_friendly( version = description[["Version"]], - sha = description[["RemoteSha"]] + sha = if (dev) description[["RemoteSha"]] ) - fmt <- paste( - "renv %1$s was loaded from project library, but this project is configured to use renv %2$s.", - "- Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.", - "- Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", - sep = "\n" - ) + fmt <- heredoc(" + renv %1$s was loaded from project library, but this project is configured to use renv %2$s. + - Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile. + - Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library. + ") catf(fmt, friendly, renv_bootstrap_version_friendly(version), remote) FALSE @@ -841,7 +898,7 @@ local({ hooks <- getHook("renv::autoload") for (hook in hooks) if (is.function(hook)) - tryCatch(hook(), error = warning) + tryCatch(hook(), error = warnify) # load the project renv::load(project) @@ -982,10 +1039,15 @@ local({ } - renv_bootstrap_version_friendly <- function(version, sha = NULL) { + renv_bootstrap_version_friendly <- function(version, shafmt = NULL, sha = NULL) { sha <- sha %||% attr(version, "sha", exact = TRUE) - parts <- c(version, sprintf("[sha: %s]", substring(sha, 1L, 7L))) - paste(parts, collapse = " ") + parts <- c(version, sprintf(shafmt %||% " [sha: %s]", substring(sha, 1L, 7L))) + paste(parts, collapse = "") + } + + renv_bootstrap_exec <- function(project, libpath, version) { + if (!renv_bootstrap_load(project, libpath, version)) + renv_bootstrap_run(version, libpath) } renv_bootstrap_run <- function(version, libpath) { @@ -1012,11 +1074,6 @@ local({ } - - renv_bootstrap_in_rstudio <- function() { - commandArgs()[[1]] == "RStudio" - } - renv_json_read <- function(file = NULL, text = NULL) { jlerr <- NULL @@ -1024,7 +1081,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) @@ -1033,7 +1090,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) @@ -1046,14 +1103,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]] @@ -1101,14 +1158,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))) { @@ -1135,7 +1192,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)) } } @@ -1155,26 +1212,8 @@ local({ # construct full libpath libpath <- file.path(root, prefix) - # attempt to load - if (renv_bootstrap_load(project, libpath, version)) - return(TRUE) - - if (renv_bootstrap_in_rstudio()) { - setHook("rstudio.sessionInit", function(...) { - renv_bootstrap_run(version, libpath) - - # Work around buglet in RStudio if hook uses readline - tryCatch( - { - tools <- as.environment("tools:rstudio") - tools$.rs.api.sendToConsole("", echo = FALSE, focus = FALSE) - }, - error = function(cnd) {} - ) - }) - } else { - renv_bootstrap_run(version, libpath) - } + # run bootstrap code + renv_bootstrap_exec(project, libpath, version) invisible() diff --git a/statistics-production/ud.qmd b/statistics-production/ud.qmd index d7909e4..5861048 100644 --- a/statistics-production/ud.qmd +++ b/statistics-production/ud.qmd @@ -856,7 +856,7 @@ Individual needs can be provided using **sen_primary_need** and **sen_secondary_ The options for **sen_secondary_need** are the same as for **sen_primary_need**, except for **No primary need** is replaced by **No secondary need**. -If using **breakdown_topic** and **breakdown** insead of individual columns, then he appropriate entries for **breakdown_topic** are SEN status, SEN provision, SEN primary need and SEN secondary need. +If using **breakdown_topic** and **breakdown** insead of individual columns, then the appropriate entries for **breakdown_topic** are SEN status, SEN provision, SEN primary need and SEN secondary need. ---