-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRprofile.site
28 lines (24 loc) · 1.13 KB
/
Rprofile.site
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# prevent "Registered S3 method overwritten" messages
prevent_s3_msgs <- Sys.getenv("_R_S3_METHOD_REGISTRATION_NOTE_OVERWRITES_", unset = "false")
Sys.setenv(`_R_S3_METHOD_REGISTRATION_NOTE_OVERWRITES_` = prevent_s3_msgs)
# add a default CRAN mirror
ppm <- Sys.getenv("PPM", unset = "https://packagemanager.posit.co/cran/__linux__/jammy/latest")
cran <- Sys.getenv("CRAN", unset = "https://cloud.r-project.org")
options(repos = c(PPM = ppm, CRAN = cran))
# setup user agent for RSPM
# https://docs.posit.co/rspm/admin/serving-binaries/#binary-user-agents
user_agent <- sprintf(
"R/%s R (%s)",
getRversion(),
paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"])
)
options(download.file.method = "libcurl", HTTPUserAgent = user_agent)
# Add R mimetype to specify how the plot returns from R to the browser.
# https://notebook.community/andrie/jupyter-notebook-samples/Changing%20R%20plot%20options%20in%20Jupyter # nolint
options(jupyter.plot_mimetypes = c(
"text/plain", # plot description, always keep
"image/svg+xml",
"image/png"
))
# don't show all startup messages for CourseKata
options(coursekata.quiet = TRUE)