generated from GoldenbergLab/r-project-template-env-ari
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rprofile
62 lines (53 loc) · 1.32 KB
/
.Rprofile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
source("renv/activate.R")
#### -- Consistent File Downloads -- ####
if(.Platform$OS.type == "windows") {
options(
download.file.method = "wininet"
)
} else {
options(
download.file.method = "libcurl"
)
}
#### -- Set CRAN -- ####
options(
repos=c("https://cran.rstudio.com/")
)
#### -- Factors Are Not Strings -- ####
options(
stringsAsFactors = FALSE
)
#### -- Display -- ####
options(
digits = 12, # number of significant digits to show by default
width = 80 # console width
)
#### -- Time Zone -- ####
if (Sys.getenv("TZ") == "") Sys.setenv("TZ" = Sys.timezone())
if (interactive()) {
message("Session Time: ", format(Sys.time(), tz = Sys.getenv("TZ"), usetz = TRUE))
}
#### -- Session -- ####
.First <- function() {
if (interactive()) {
cat("\n")
utils::timestamp("", prefix = paste("##------ [", getwd(), "] ", sep = ""))
cat("\nSuccessfully loaded .Rprofile at", base::date(), "\n")
cat("\n")
cat("For more information about this project template, go to:\n")
cat("https://github.com/startyourlab/r-project-template\n")
}
}
if (interactive()) {
message("Session Info: ", utils::sessionInfo()[[4]])
message("Session User: ", Sys.info()["user"])
}
options(
prompt = "R > ",
continue = "... "
)
#### -- Dev Tools -- ####
if (interactive()) {
library(fs)
library(devtools)
}