Jeromy Anglim's Blog: Psychology and Statistics

Monday, July 23, 2012

Beamer presentations using pandoc, markdown, LaTeX, and a makefile

This post discusses the creation of beamer presentations using a combination of markdown, pandoc, and LaTeX. This workflow offers the potential to reduce typing and increase readability of beamer presentation source code. Source code for an example presentation is provided containing markdown and LaTeX source code along with a makefile for building the beamer PDF.

Thursday, July 19, 2012

Video: knitr, R Markdown, and R Studio: Introduction to Reproducible Analysis

This post presents the video of a talk that I presented in July 2012 at Melbourne R Users on using knitr, R Markdown, and R Studio to perform reproducible analysis. I also provide links to a github repository where the R markdown examples can be examined and the slides can be downloaded.

Sunday, June 10, 2012

Converting Sweave LaTeX to knitr LaTeX: A case study

The following post documents the steps I needed to take in order to convert a project using Sweave LaTeX into one using knitr LaTeX.

Monday, June 4, 2012

How to Convert Sweave LaTeX to knitr R Markdown: Winter Olympic Medals Example

The following post shows how to manually convert a Sweave LaTeX document into a knitr R Markdown document. The post (1) reviews many of the required changes; (2) provides an example of a document converted to R Markdown format based on an analysis of Winter Olympic Medal data up to and including 2006; and (3) discusses the pros and cons of LaTeX and Markdown for performing analyses.

Friday, May 18, 2012

Example Reproducible Report using R Markdown: Analysis of California Schools Test Data

This is a quick set of analyses of the California Test Score dataset. The post was produced using R Markdown in RStudio 0.96. The main purpose of this post is to provide a case study of using R Markdown to prepare a quick reproducible report. It provides examples of using plots, output, in-line R code, and markdown. The post is designed to be read along side the R Markdown source code, which is available as a gist on github.

Thursday, May 17, 2012

Getting Started with R Markdown, knitr, and Rstudio 0.96

This post examines the features of R Markdown using knitr in Rstudio 0.96. This combination of tools provides an exciting improvement in usability for reproducible analysis. Specifically, this post (1) discusses getting started with R Markdown and knitr in Rstudio 0.96; (2) provides a basic example of producing console output and plots using R Markdown; (3) highlights several code chunk options such as caching and controlling how input and output is displayed; (4) demonstrates use of standard Markdown notation as well as the extended features of formulas and tables; and (5) discusses the implications of R Markdown. This post was produced with R Markdown. The source code is available here as a gist. The post may be most useful if the source code and displayed post are viewed side by side. In some instances, I include a copy of the R Markdown in the displayed HTML, but most of the time I assume you are reading the source and post side by side.

Thursday, May 3, 2012

How to plot three categorical variables and one continuous variable using ggplot2

This post shows how to produce a plot involving three categorical variables and one continuous variable using ggplot2 in R.

Wednesday, April 11, 2012

Getting Started with JAGS, rjags, and Bayesian Modelling

This post provides links to various resources on getting started with Bayesian modelling using JAGS and R. It discusses: (1) what is JAGS; (2) why you might want to perform Bayesian modelling using JAGS; (3) how to install JAGS; (4) where to find further information on JAGS; (5) where to find examples of JAGS scripts in action; (6) where to ask questions; and (7) some interesting psychological applications of Bayesian modelling.

Friday, February 17, 2012

New Psychology and Cognitive Science Question and Answer Site: COGSCI.SE

There is now a new website for researchers to ask and answer questions on topics related to psychology and cognitive science. The site is From the success of earlier released sites in the Stack Exchange network such as those on programming, statistics, and latex, the site for psychology and cognitive science has the potential be a great resource for researchers. I'm actively contributing on the site. So, if you are a researcher in psychology, I hope you'll check it out. The rest of this post sets out (a) a little history of Stack Exchange question and answer sites as they relate to psychology and statistics; (b) why I think this new site for psychology and cognitive science has so much potential; and (c) why, if you are a professional or student researcher in psychology, you might want to get involved.