generated from lemaslab/project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rprofile
26 lines (19 loc) · 824 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
############################################################
## Options for knitr and Rmarkdown rendering
############################################################
library("knitr")
library("rmarkdown")
## 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)
cat('Project home directory is available as PROJHOME or via get("PROJHOME","RPROJ")\n')
rm(RPROJ)
############################################################