R System Profile: /Library/Frameworks/R.framework/Resources/library/base/R/Rprofile
This is the system Rprofile file. It is always run on startup.
Additional commands can be placed in site or user Rprofile files
(see ?Rprofile).
Copyright (C) 1995-2023 The R Core Team
Notice that it is a bad idea to use this file as a template for
personal startup files, since things will be executed twice and in
the wrong environment (user profiles are run in .GlobalEnv).
.GlobalEnv <- globalenv()
attach(NULL, name = "Autoloads")
.AutoloadEnv <- as.environment(2)
assign(".Autoloaded", NULL, envir = .AutoloadEnv)
T <- TRUE
F <- FALSE
R.version <- structure(R.Version(), class = "simple.list")
version <- R.version # for S compatibility
for backwards compatibility only
R.version.string <- R.version$version.string
NOTA BENE: options() for non-base package functionality are in places like
--------- ../utils/R/zzz.R
options(keep.source = interactive())
options(warn = 0)
options(repos = c(CRAN="@CRAN@"))
setting from an env variable added in 4.0.2
local({to <- as.integer(Sys.getenv("R_DEFAULT_INTERNET_TIMEOUT", 60))
if (is.na(to) || to <= 0) to <- 60L
options(timeout = to)
})
options(encoding = "native.enc")
options(show.error.messages = TRUE)
keep in sync with PrintDefaults() in ../../main/print.c :
options(scipen = 0)
options(max.print = 99999)# max. #{entries} in internal printMatrix()
options(add.smooth = TRUE)# currently only used in 'plot.lm'
if(!interactive())
options(showErrorCalls = TRUE)
options(catch.script.errors = FALSE)
local({dp <- Sys.getenv("R_DEFAULT_PACKAGES")
if(identical(dp, "")) ## it fact methods is done first
dp <- c("datasets", "utils", "grDevices", "graphics",
"stats", "methods")
else if(identical(dp, "NULL")) dp <- character(0)
else dp <- strsplit(dp, ",")[[1]]
dp <- sub("[[:blank:]]*([[:alnum:]]+)", "\1", dp) # strip whitespace
options(defaultPackages = dp)
})
Expand R_LIBS_* environment variables.
Sys.setenv(R_LIBS_SITE =
.expand_R_libs_env_var(Sys.getenv("R_LIBS_SITE")))
Sys.setenv(R_LIBS_USER =
.expand_R_libs_env_var(Sys.getenv("R_LIBS_USER")))
local({
if(nzchar(tl <- Sys.getenv("R_SESSION_TIME_LIMIT_CPU")))
setSessionTimeLimit(cpu = tl)
if(nzchar(tl <- Sys.getenv("R_SESSION_TIME_LIMIT_ELAPSED")))
setSessionTimeLimit(elapsed = tl)
})
.First.sys <- function()
{
for(pkg in getOption("defaultPackages")) {
res <- require(pkg, quietly = TRUE, warn.conflicts = FALSE,
character.only = TRUE)
if(!res)
warning(gettextf('package %s in options("defaultPackages") was not found', sQuote(pkg)),
call. = FALSE, domain = NA)
}
}
called at C level in the startup process prior to .First.sys
.OptRequireMethods <- function()
{
pkg <- "methods" # done this way to avoid R CMD check warning
if(pkg %in% getOption("defaultPackages"))
if(!require(pkg, quietly = TRUE, warn.conflicts = FALSE,
character.only = TRUE))
warning('package "methods" in options("defaultPackages") was not found',
call. = FALSE)
}
if(nzchar(Sys.getenv("R_BATCH"))) {
.Last.sys <- function()
{
cat("> proc.time()\n")
print(proc.time())
}
## avoid passing on to spawned R processes
## A system has been reported without Sys.unsetenv, so try this
try(Sys.setenv(R_BATCH=""))
}
local({
if(nzchar(rv <- Sys.getenv("R_RNG_VERSION")))
suppressWarnings(RNGversion(rv))
})
.sys.timezone <- NA_character_
local({
## create an active binding for .Library.site, so that it can be
## modified after the base environment is locked
## remove the binding in the lazyload data base
.Internal(mkUnbound(as.name(".Library.site")))
siteLibrary <- character()
slfun <- function(v) {
if (!missing(v))
siteLibrary <<- v
siteLibrary
}
makeActiveBinding(".Library.site", slfun, baseenv())
## make .Library.site accessible also from global environment to
## preserve functionality of site profiles assigning to it directly
## (originally, site profiles were run in base environment)
makeActiveBinding(".Library.site", slfun, globalenv())
})
###-- R -- Unix Specific ----
.Library <- file.path(R.home(), "library")
.Library.site <- Sys.getenv("R_LIBS_SITE") # This is set in Renviron.
.Library.site <-
if(.Library.site == "NULL") character() else unlist(strsplit(.Library.site, ":"))
.Library.site <- .Library.site[dir.exists(.Library.site)]
local({
libs <- Sys.getenv("R_LIBS_USER") # This is set in Renviron.
libs <- if(libs == "NULL") character() else unlist(strsplit(libs, ":"))
## .libPaths filters on existence.
invisible(.libPaths(c(unlist(strsplit(Sys.getenv("R_LIBS"), ":")),
libs)))
})
local({
popath <- Sys.getenv("R_TRANSLATIONS", "")
if(!nzchar(popath)) {
paths <- file.path(.libPaths(), "translations", "DESCRIPTION")
popath <- dirname(paths[file.exists(paths)][1])
}
bindtextdomain("R", popath)
bindtextdomain("R-base", popath)
assign(".popath", popath, .BaseNamespaceEnv)
})
local({
we distinguish between R_PAPERSIZE as set by the user and by configure
papersize <- Sys.getenv("R_PAPERSIZE_USER")
if(!nchar(papersize)) {
lcpaper <- Sys.getlocale("LC_PAPER") # might be null: OK as nchar is 0
papersize <- if(nchar(lcpaper))
if(length(grep("(_US|_CA)", lcpaper))) "letter" else "a4"
else Sys.getenv("R_PAPERSIZE")
}
options(papersize = papersize,
printcmd = Sys.getenv("R_PRINTCMD"),
dvipscmd = Sys.getenv("DVIPS", "dvips"),
texi2dvi = Sys.getenv("R_TEXI2DVICMD"),
browser = Sys.getenv("R_BROWSER"),
pager = file.path(R.home(), "bin", "pager"),
pdfviewer = Sys.getenv("R_PDFVIEWER"),
useFancyQuotes = TRUE)
})
non standard settings for the R.app GUI of the macOS port
if(.Platform$GUI == "AQUA") {
## this is set to let RAqua use both X11 device and X11/TclTk
if (Sys.getenv("DISPLAY") == "")
Sys.setenv("DISPLAY" = ":0")
## this is to allow gfortran compiler to work
Sys.setenv("PATH" = paste(Sys.getenv("PATH"),":/usr/local/bin",sep = ""))
}## end "Aqua"
de-dupe the environment on macOS (bug in Yosemite which affects things like PATH)
if (grepl("^darwin", R.version$os)) local({
## we have to de-dupe one at a time and re-check since the bug affects how
## environment modifications propagate
while(length(dupes <- names(Sys.getenv())[table(names(Sys.getenv())) > 1])) {
env <- dupes[1]
value <- Sys.getenv(env)
Sys.unsetenv(env) ## removes the dupes, good
.Internal(Sys.setenv(env, value)) ## wrapper requries named vector, a pain, hence internal
}
})
local({
tests_startup <- Sys.getenv("R_TESTS")
if(nzchar(tests_startup)) source(tests_startup)
})
R Site Profile: /Library/Frameworks/R.framework/Resources/etc/Rprofile.site
(File does not exist)
R User Profile: /Users/kaisu/.Rprofile
(File does not exist)
R Site Environ: /Library/Frameworks/R.framework/Resources/etc/Renviron.site
(File does not exist)
R User Environ: /Users/kaisu/.Renviron
(File does not exist)
R Temporary Directory
/var/folders/xj/jdmy215543q6gv8k64jdj3q00000gn/T//Rtmp9UcOz2
Files in R Temporary Directory
rs-graphics-54b38d90-c74d-45bb-adf3-576d4c594f53
Log file: /Users/kaisu/.local/share/rstudio/log/rdesktop.log
(Empty)
Log file: /Users/kaisu/.local/share/rstudio/log/rsession-kaisu.log
2024-09-10T14:50:55.064891Z [rsession-kaisu] WARNING ASSERTION FAILED: !posix::pthread_mutex_lock(&m); LOGGED FROM: void rstudio_boost::recursive_mutex::lock() /Users/user193109/opt/rstudio-tools/arm64/boost/boost_1_83_0/include/boost/thread/pthread/recursive_mutex.hpp:108
2024-09-10T14:50:55.064891Z [rsession-kaisu] WARNING ASSERTION FAILED: !posix::pthread_mutex_lock(&m); LOGGED FROM: void rstudio_boost::recursive_mutex::lock() /Users/user193109/opt/rstudio-tools/arm64/boost/boost_1_83_0/include/boost/thread/pthread/recursive_mutex.hpp:108
2024-09-10T14:50:55.066908Z [rsession-kaisu] WARNING ASSERTION FAILED: !posix::pthread_mutex_unlock(&m); LOGGED FROM: void rstudio_boost::recursive_mutex::unlock() /Users/user193109/opt/rstudio-tools/arm64/boost/boost_1_83_0/include/boost/thread/pthread/recursive_mutex.hpp:113
2024-09-10T14:50:55.066908Z [rsession-kaisu] WARNING ASSERTION FAILED: !posix::pthread_mutex_unlock(&m); LOGGED FROM: void rstudio_boost::recursive_mutex::unlock() /Users/user193109/opt/rstudio-tools/arm64/boost/boost_1_83_0/include/boost/thread/pthread/recursive_mutex.hpp:113
2024-09-11T01:03:51.747466Z [rsession-kaisu] ERROR system error 92 (Illegal byte sequence) [str: 一, len: 3, from: UTF-8, to: ISO8859-1]; OCCURRED AT core::Error rstudio::r::util::(anonymous namespace)::iconvstrImpl(const std::string &, const std::string &, const std::string &, bool, std::string *) src/cpp/r/RUtil.cpp:268; LOGGED FROM: Error rstudio::session::modules::spelling::(anonymous namespace)::checkSpelling(const json::JsonRpcRequest &, json::JsonRpcResponse *) src/cpp/session/modules/SessionSpelling.cpp:225
2024-09-11T01:03:51.747466Z [rsession-kaisu] ERROR system error 92 (Illegal byte sequence) [str: 一, len: 3, from: UTF-8, to: ISO8859-1]; OCCURRED AT core::Error rstudio::r::util::(anonymous namespace)::iconvstrImpl(const std::string &, const std::string &, const std::string &, bool, std::string *) src/cpp/r/RUtil.cpp:268; LOGGED FROM: Error rstudio::session::modules::spelling::(anonymous namespace)::checkSpelling(const json::JsonRpcRequest &, json::JsonRpcResponse *) src/cpp/session/modules/SessionSpelling.cpp:225
2024-09-11T01:16:48.506642Z [rsession-kaisu] ERROR system error 92 (Illegal byte sequence) [str: 一, len: 3, from: UTF-8, to: ISO8859-1]; OCCURRED AT core::Error rstudio::r::util::(anonymous namespace)::iconvstrImpl(const std::string &, const std::string &, const std::string &, bool, std::string *) src/cpp/r/RUtil.cpp:268; LOGGED FROM: Error rstudio::session::modules::spelling::(anonymous namespace)::checkSpelling(const json::JsonRpcRequest &, json::JsonRpcResponse *) src/cpp/session/modules/SessionSpelling.cpp:225
2024-09-11T01:16:48.506642Z [rsession-kaisu] ERROR system error 92 (Illegal byte sequence) [str: 一, len: 3, from: UTF-8, to: ISO8859-1]; OCCURRED AT core::Error rstudio::r::util::(anonymous namespace)::iconvstrImpl(const std::string &, const std::string &, const std::string &, bool, std::string *) src/cpp/r/RUtil.cpp:268; LOGGED FROM: Error rstudio::session::modules::spelling::(anonymous namespace)::checkSpelling(const json::JsonRpcRequest &, json::JsonRpcResponse *) src/cpp/session/modules/SessionSpelling.cpp:225
User prefs: /Users/kaisu/.config/rstudio/rstudio-prefs.json
{
"jobs_tab_visibility": "shown",
"initial_working_directory": "~",
"posix_terminal_shell": "bash",
"cran_mirror": {
"name": "China (Beijing 3) [https]",
"host": "Peking University",
"url": "https://mirrors.pku.edu.cn/CRAN/",
"country": "cn",
"ok": 1,
"secondary": ""
},
"python_type": "system",
"python_version": "3.9.6",
"python_path": "/usr/bin/python3",
"default_project_location": "/Users/kaisu/Desktop/cohort/analy",
"load_workspace": false,
"always_save_history": false,
"syntax_color_console": true,
"console_line_length_limit": 100000
}
System prefs: /etc/rstudio/rstudio-prefs.json
(Not Found)
User state: /Users/kaisu/.local/share/rstudio/rstudio-desktop.json
{
"context_id": "D4C17383",
"visual_mode_confirmed": true
}