Skip to content

Commit

Permalink
Merge pull request #57 from Marshmaline/patch-3
Browse files Browse the repository at this point in the history
Update 15-knitr-markdown.Rmd
  • Loading branch information
raynamharris committed Feb 24, 2018
2 parents 952dbfe + dadb67d commit 83eb978
Showing 1 changed file with 36 additions and 5 deletions.
41 changes: 36 additions & 5 deletions episodes/15-knitr-markdown.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ keypoints:
source: Rmd
---


```{r chunk_options, include=FALSE}
source("../bin/chunk-options.R")
knitr_fig_path("15-")
```


## Informes de análisis de datos
Expand Down Expand Up @@ -249,10 +252,38 @@ producidas, se incluyen enlaces a esas figuras.
Los documentos **Markdown** y figura son entones procesados por la herramienta
[pandoc](http://pandoc.org/), que convierte el archivo **Markdown** en un
archivo **html**, con las figuras embebidas.

<img src="../fig/rmd-15-rmd_to_html_fig-1.png" title="plot of chunk rmd_to_html_fig" alt="plot of chunk rmd_to_html_fig" style="display: block; margin: auto auto auto 0;" />


```{r rmd_to_html_fig, fig.width=8, fig.height=3, fig.align="left", echo=FALSE}
par(mar=rep(0, 4), bty="n", cex=1.5)
plot(0, 0, type="n", xlab="", ylab="", xaxt="n", yaxt="n",
xlim=c(0, 100), ylim=c(0, 100))
xw <- 10
yh <- 35
xm <- 12
ym <- 50
rect(xm-xw/2, ym-yh/2, xm+xw/2, ym+yh/2, lwd=2)
text(xm, ym, ".Rmd")
xm <- 50
ym <- 80
rect(xm-xw/2, ym-yh/2, xm+xw/2, ym+yh/2, lwd=2)
text(xm, ym, ".md")
xm <- 50; ym <- 25
for(i in c(2, 0, -2))
rect(xm-xw/2+i, ym-yh/2+i, xm+xw/2+i, ym+yh/2+i, lwd=2,
border="black", col="white")
text(xm-2, ym-2, "figs/")
xm <- 100-12
ym <- 50
rect(xm-xw/2, ym-yh/2, xm+xw/2, ym+yh/2, lwd=2)
text(xm, ym, ".html")
arrows(22, 50, 38, 50, lwd=2, col="slateblue", len=0.1)
text((22+38)/2, 60, "knitr", col="darkslateblue", cex=1.3)
arrows(62, 50, 78, 50, lwd=2, col="slateblue", len=0.1)
text((62+78)/2, 60, "pandoc", col="darkslateblue", cex=1.3)
```


## Opciones de fragmento
Expand Down

0 comments on commit 83eb978

Please sign in to comment.