Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove the brew and Rhtml examples

  • Loading branch information...
commit bf6140cb28911b69a95a95c67400346b78bff93b 1 parent c0b5c90
@yihui authored
View
1  .Rbuildignore
@@ -9,7 +9,6 @@ inst/examples/child/knitr-.*\.md
inst/examples/figure
inst/examples/cache
inst/examples/ex-out*
-knitr-minimal.html
knitr-minimal.md
knitr-spin.md
knitr-latex.tex
View
2  .gitignore
@@ -5,8 +5,6 @@
knitr-*.pdf
inst/examples/cache
inst/examples/figure
-inst/examples/ex-out*
-knitr-minimal.html
knitr-latex.tex
knitr-spin.md
knitr-spin.html
View
3  inst/examples/knit-all.R
@@ -18,7 +18,7 @@ for (i in list.files(pattern = '\\.lyx$')) {
call_knit = function(cmd) {
stopifnot(identical(system(cmd), 0L))
}
-for (i in list.files(pattern = '\\.R(tex|md|html|rst)')) {
+for (i in list.files(pattern = '\\.R(tex|md|rst)')) {
message(i)
cmd = if (i == 'knitr-minimal.Rmd') {
sprintf("Rscript -e 'library(knitr);opts_knit$set(base.url=\"https://github.com/yihui/knitr/raw/master/inst/examples/\");opts_chunk$set(fig.path=\"\");knit(\"%s\")'", i)
@@ -29,7 +29,6 @@ for (i in list.files(pattern = '\\.R(tex|md|html|rst)')) {
flush.console()
}
-call_knit(sprintf("Rscript -e 'library(knitr);knit(\"knitr-minimal.brew\", \"\")'"))
call_knit(sprintf("Rscript -e 'library(knitr);spin(\"knitr-spin.R\")'"))
setwd('child')
View
64 inst/examples/knitr-minimal.Rhtml
@@ -1,63 +1 @@
-<!DOCTYPE html>
-<head>
- <title>A minimal knitr example in HTML</title>
-</head>
-<body>
-<!--begin.rcode
- opts_chunk$set(fig.width=5, fig.height=5, fig.path='ex-out-')
- end.rcode-->
-
- <p>This is a minimal example which shows <strong>knitr</strong>
- working with HTML
- pages. See <a href="https://github.com/downloads/yihui/knitr/knitr-minimal.html">here</a>
- for the output and
- <a href="https://github.com/yihui/knitr/blob/master/inst/examples/knitr-minimal.Rhtml">here</a>
- for the source.</p>
-
- <p>Boring stuff as usual:</p>
-
-<!--begin.rcode
- ## a simple calculator
- 1+1
- ## boring random numbers
- set.seed(123)
- rnorm(5)
- end.rcode-->
-
- <p>We can also produce plots (centered by the
- option <code>fig.align='center'</code>):</p>
-
-<!--begin.rcode html-cars-scatter, message=FALSE, fig.align='center'
- library(ggplot2)
- plot(mpg~hp, mtcars)
- qplot(hp, mpg, data=mtcars)+geom_smooth()
- end.rcode-->
-
- <p>Errors, messages and warnings can be put into <code>div</code>'s
- with different <code>class</code>es:</p>
-
-<!--begin.rcode
- sqrt(-1) # warning
- message('knitr says hello to HTML!')
- 1+'a' # mission impossible
- end.rcode-->
-
- <p>In the end, let's show off a 3D plot from
- the <strong>rgl</strong> package.</p>
-
-<!--begin.rcode
- knit_hooks$set(rgl = hook_rgl) # set up the hook first
- end.rcode-->
-
-<!--begin.rcode fancy-rgl, rgl=TRUE, fig.align='center', fig.width=4, fig.height=4
- if (require('rgl')) {
- demo('bivar', package='rgl', echo=FALSE)
- par3d(zoom=.7)
- }
- end.rcode-->
-
- <p>Well, everything seems to be working. Let's ask R what is the
- value of &pi;? Of course it is <!--rinline pi -->.</p>
-
-</body>
-</html>
+See https://github.com/yihui/knitr-examples/blob/master/003-minimal.Rhtml
Please sign in to comment.
Something went wrong with that request. Please try again.