R

tidyr tutorial

Tutorial showing the functionality of the tidyr package for data munging.

How to scrape data from Google Sheets in R

Google Forms offers a convenient way to collect data online. It is particularly useful because you can embed the form in a webpage, link the results with a spreadsheet and publish the results online. This post shows how to scrape the data from the spreadsheet (google form) in r using the package RCurl. You should be able to follow along by copying and pasting the code into an R session.

Data pipelines in R

Overview So you thought up a clever experiment, got IRB approval, recruited participants and collected data… now what? New researchers are often confronted with an unfortunate surprise when it comes time to perform some kind of analysis on their data: they don’t know how, or even where to start. This can be a problem for something trivial, like obtaining simple descriptive statistics, or something much more complex, like fitting models, creating plots and making predictions.

Basic plotting in R

Step-by-step examples for using the three main plotting systems in R.

HTML widgets in Rmarkdown

Walkthrough for incorporating HTML widgets into an Rmarkdown document.

Slidify tutorial

Tutorial for creating HTML presentations using R and slidify.

TikzDevice tutorial III: standalone plots

In this post I’m going to show you how to use TikzDevice to create high quality plots that use the same font as your LaTeX document. I’m assuming that you have already installed tikz. If not, see part I in this series. Moreover, this tutorial assumes that you have set up your project in the same way outlined in part II. An added benefit to this approach is that it allows you to insert IPA symbols into the plot via the tipa package.

Knitr bootstrap

Quick and dirty test for knitr boostrap framework.

Converting markdown files to HTML5 in RStudio

HTML5 slides I recently learned how to create HTML5 slides using .Rmd files and pandoc. Click here to check out an example. I will be posting a tutorial on how to do this in the near future (I hope). Update Here is a much cooler example I found on mages’ blog Update 2 This process has been streamlined in the newest update to RStudio (check it out here). The results are quite impressive (Ex.

TikzDevice tutorial II: structuring a project

Overview This mini tutorial is part II about incorporating tikzDevice into your workflow. It explains the file structure necessary to successfully include tikzDevice plots into your LaTeX document. You must first have tikzDevice installed. If you don’t, see part I for more information. The structure A simple yet effective way to do reproducible research is to use R (for statistical analysis) directly in a LaTeX environment. There are two ways to accomplish this: (1) Sweave and (2) knitr.