R Under development (unstable) (2024-07-28 r86931 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > renviron_d <- startup::renviron_d > rprofile_d <- startup::rprofile_d > > message("*** startup() ...") *** startup() ... > > message("*** renviron_d() ...") *** renviron_d() ... > > paths <- system.file("Renviron.d", package = "startup") > print(paths) [1] "D:/RCompile/CRANincoming/R-devel/lib/startup/Renviron.d" > api <- renviron_d(paths = paths, skip = FALSE) > str(api) List of 3 $ renviron_d:function (sibling = FALSE, all = FALSE, unload = FALSE, skip = NA, dryrun = NA, debug = NA, paths = NULL) $ rprofile_d:function (sibling = FALSE, all = FALSE, check = NA, unload = FALSE, skip = NA, on_error = c("error", "warning", "immediate.warning", "message", "ignore"), dryrun = NA, debug = NA, paths = NULL) $ unload :function (debug = FALSE) > renviron_d(paths = paths, skip = FALSE, dryrun = TRUE) > > message("*** renviron_d() ... DONE") *** renviron_d() ... DONE > > message("*** rprofile_d() ...") *** rprofile_d() ... > > paths <- system.file("Rprofile.d", package = "startup") > print(paths) [1] "D:/RCompile/CRANincoming/R-devel/lib/startup/Rprofile.d" > api <- rprofile_d(paths = paths, skip = FALSE) > str(api) List of 3 $ renviron_d:function (sibling = FALSE, all = FALSE, unload = FALSE, skip = NA, dryrun = NA, debug = NA, paths = NULL) $ rprofile_d:function (sibling = FALSE, all = FALSE, check = NA, unload = FALSE, skip = NA, on_error = c("error", "warning", "immediate.warning", "message", "ignore"), dryrun = NA, debug = NA, paths = NULL) $ unload :function (debug = FALSE) > rprofile_d(paths = paths, skip = FALSE, dryrun = TRUE) > > message("*** rprofile_d() ... DONE") *** rprofile_d() ... DONE > > > message("*** startup() - exceptions ...") *** startup() - exceptions ... > > path <- system.file("Rprofile.d,checks", package = "startup") > path_tmp <- tempdir() > file.copy(path, path_tmp, recursive = TRUE, overwrite = TRUE) [1] TRUE > > oopts <- options(encoding = "native.enc") > res <- tryCatch({ + rprofile_d(paths = path_tmp, skip = FALSE, on_error = "warning") + }, warning = identity) > stopifnot(inherits(res, "simpleWarning")) > > options(encoding = "native.enc") > res <- tryCatch({ + rprofile_d(paths = path_tmp, skip = FALSE, on_error = "immediate.warning") + }, warning = identity) > stopifnot(inherits(res, "simpleWarning")) > > options(encoding = "native.enc") > res <- tryCatch({ + rprofile_d(paths = path_tmp, skip = FALSE, on_error = "error") + }, error = identity) > stopifnot(inherits(res, "simpleError")) > > options(encoding = "native.enc") > res <- rprofile_d(paths = path_tmp, skip = FALSE, on_error = "message") startup::files_apply(): Failure processing startup file 'D:\temp\RtmpwXTYib/Rprofile.d,checks/an_error.R': An error occurred This line does not have a newline startup::files_apply(): Failure processing startup file 'D:\temp\RtmpwXTYib/Rprofile.d,checks/update_packages.R': trying to use CRAN without setting a mirror > stopifnot(is.list(res)) > > options(encoding = "native.enc") > res <- rprofile_d(paths = path_tmp, skip = FALSE, on_error = "ignore") This line does not have a newline > stopifnot(is.list(res)) > > options(oopts) > > message("*** startup() - exceptions ... DONE") *** startup() - exceptions ... DONE > > > message("*** startup() ... DONE") *** startup() ... DONE > > proc.time() user system elapsed 0.18 0.06 0.23