forked from kingaa/sbied
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.Rnw
55 lines (51 loc) · 1.05 KB
/
setup.Rnw
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
<<setup-child,include=FALSE,cache=FALSE,purl=FALSE>>=
library(knitr)
if (!exists("params")) params <- list()
opts_chunk$set(
cache=TRUE,
cache.path=paste("tmp","cache",as.character(params$prefix),sep="/"),
comment=NA,
echo=TRUE,
eval=TRUE,
dev='CairoPNG',
dev.args=list(bg='transparent'),
dpi=300,
error=FALSE,
fig.align='center',
fig.height=4,fig.width=6.83,
fig.lp="fig:",
fig.path=paste("tmp","figure",as.character(params$prefix),sep="/"),
fig.pos="h!",
fig.show='asis',
highlight=TRUE,
include=TRUE,
message=FALSE,
progress=TRUE,
prompt=FALSE,
purl=TRUE,
results="markup",
size='small',
strip.white=TRUE,
tidy=FALSE,
warning=FALSE
)
options(
width=60, # number of characters in R output before wrapping
keep.source=TRUE,
encoding="UTF-8"
)
library(ggplot2)
theme_set(theme_bw())
knit_hooks$set(
document = function (x) {
sub('\\usepackage[]{color}','\\usepackage{xcolor}',x,fixed=TRUE)
}
)
registerS3method(
"knit_print",
"data.frame",
function (x, ...) {
print(x,row.names=FALSE)
}
)
@