Blog Archives

Embed R Code with Syntax Highlighting on your Blog

September 7, 2010
By

If you use blogger or even wordpress you've probably found that it's complicated to post code snippets with spacing preserved and syntax highlighting (especially for R code). I've discovered a few workarounds that involve hacking the blogger HTML templ...

Read more »

Writing my Thesis – Follow me on Twitter

August 31, 2010
By

A few weeks ago I suddenly reached the point that every graduate student once thought would never come - time to start writing my thesis. With a blank page and a blinking cursor staring me in the face it's time to compile all of my published and unpubl...

Read more »

Deducer: R and ggplot2 GUI

August 16, 2010
By

Last Year I introduced you to R Commander, a nice graphical user interface (GUI) for R for those of you who are still hesitant to leave the clicky-box style research a la SPSS for the far more superior reproducible research using R. As most of you know...

Read more »

Quickly Find the Class of data.frame vectors in R

August 9, 2010
By

Aviad Klein over at My ContRibution wrote a convenient R function to list the classes of all the vectors that make up a data.frame. You would think apply(kyphosis,2,class) would do the job but it doesn't - it calls every vector a character class. Aviad wrote an elegant little function that does the job perfectly without having to load any...

Read more »

Hadley Wickham’s ggplot2 / Data Visualization Course Materials

July 27, 2010
By

Hadley Wickham, creator of ggplot2, an immensely popular framework for Tufte-friendly data visualization using R, is teaching two short courses at Vanderbilt this week. Once we opened registration to Vanderbilt students and staff we instantly filled al...

Read more »

QQ plot of p-values in R using base graphics

July 14, 2010
By

Update Tuesday, September 14, 2010: Fixed the ylim issue, now it sets the y axis limit based on the smallest observed p-value. A while back Will showed you how to create QQ plots of p-values in Stata and in R using the now-deprecated sma package. A bi...

Read more »

All code on GGD is Free (Open Source BSD)

July 7, 2010
By

At the request of a commenter I just wanted to clarify that any code released here for R or anything else is free and open source unless specifically stated otherwise. The open source BSD license for any code on GGD can be found on this copyright page.

Read more »

Efficient Mixed-Model Association eXpedited (EMMAX) to Simutaneously Account for Relatedness and Stratification in Genome-Wide Association Studies

June 9, 2010
By

A few months ago I covered an algorithm called EMMA (Efficient Mixed-Model Association) implemented in R for simultaneously correct for both population stratification and relatedness in an association study. This method/software is very useful because ...

Read more »

Use SQL queries to manipulate data frames in R with sqldf package

May 25, 2010
By

I've covered a few topics in the past including the plyr package, which is kind of like "GROUP BY" for R, and the merge function for merging datasets. I only recently found the sqldf package for R, and it's already one of the most useful packages I've ever installed. The main function in the package is sqldf(), which takes...

Read more »

Tutorial: Principal Components Analysis (PCA) in R

May 20, 2010
By

Found this tutorial by Emily Mankin on how to do principal components analysis (PCA) using R. Has a nice example with R code and several good references. The example starts by doing the PCA manually, then uses R's built in prcomp() function to do the s...

Read more »