Test R Markdown file - converted
Posted on July 03, 2014
An initial example using knitpost
R script, see post by JFisher, for quickly converting R-markdown (*.rmd)
into markdown (*.md)
with the associated images and such…
based on KnitPost
see http://jfisher-usgs.github.io/r/2012/07/03/knitr-jekyll/
The knitr package provides an easy way to embed R code in a Jekyll-Bootstrap blog post. The only required input is an R Markdown source file. The name of the source file used to generate this post is 2012-07-03-knitr-jekyll.Rmd, available here. Steps taken to build this post are as follows:
Step 1
Create a Jekyll-Boostrap blog if you don’t already have one. A brief tutorial on building this blog is available here.
Step 2
Open the R Console and process the source file:
Step 3
Move the resulting image folder 2012-07-03-knitr-jekyll and Markdown file 2012-07-03-knitr-jekyll.md to the local jfisher-usgs.github.com git repository. The KnitPost function assumes that the image folder will be placed in a figs folder located at the root of the repository.
Step 4
Add the following CSS code to the /assets/themes/twitter-2.0/css/bootstrap.min.css file to center images:
[alt=center] {
display: block;
margin: auto;
}
Thats it.
Here are a few examples of embedding R code:
Figure 1-1: Caption
Figure 2-1: Caption
And dont forget your session information for proper reproducible research.