-
Notifications
You must be signed in to change notification settings - Fork 10
/
.Rprofile
29 lines (23 loc) · 911 Bytes
/
.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
############################################################
## Options for knitr and Rmarkdown rendering
############################################################
## output directory for figures
if (require("knitr")) {
opts_chunk$set(fig.path="results/figures/")
opts_knit$set(base.dir=normalizePath(getwd()))
opts_knit$set(root.dir=normalizePath(getwd()))
}
############################################################
## the following is credit to Jenny Bryan, for details see here:
## https://gist.github.com/jennybc/362f52446fe1ebc4c49f
RPROJ <- list(PROJHOME = normalizePath(getwd()))
attach(RPROJ)
library('rmarkdown')
cat('Project home directory is available as PROJHOME or via get("PROJHOME","RPROJ")\n')
rm(RPROJ)
############################################################
local({
r <- getOption("repos")
r["CRAN"] <- "http://cran.cnr.berkeley.edu/"
options(repos = r)
})