repo.or.cz
/
cacheSweave.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ignore vignette PDF file
[cacheSweave.git]
/
inst
/
misc
/
test.Rnw
blob
482d85b7013a93b933f58882616a1b94a14ec8a9
1
\documentclass{article}
2
\usepackage{Sweave}
3
\title{Test Sweave Document}
4
\author{Roger Peng}
5
\begin{document}
6
\maketitle
7
Hello, this is a test Sweave document using cacheSweave.
8
%% Default has 'cache = FALSE'
9
<<setup>>=
10
setCacheDir("testcache")
11
@
12
<<first,cache=TRUE>>=
13
Sys.sleep(3)
14
a <- rnorm(100)
15
b <- a * .4 * rnorm(100, sd = 0.8)
16
fit <- lm(b ~ a)
17
@
18
<<second>>=
19
sumf <- summary(fit)
20
print(sumf)
21
@
22
\end{document}