Publications by Stephen Turner

QQ plot of p-values in R using base graphics

14.07.2010

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 bit later on I showed you how to do the same thing in R using ggplot2. As much as we (...

815 sym

Hadley Wickham’s ggplot2 / Data Visualization Course Materials

27.07.2010

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 all the available seats, so unfortunately I wasn’t able to announce the course here....

817 sym

Quickly Find the Class of data.frame vectors in R

09.08.2010

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 ...

1261 sym

Deducer: R and ggplot2 GUI

16.08.2010

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 I’m a huge fan of ggplot2. Many of you came to the short course Hadley Wickham ga...

816 sym

Writing my Thesis – Follow me on Twitter

31.08.2010

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 unpublished work I’ve accumulated over the last few years and wordsmith this pile of...

811 sym

Embed R Code with Syntax Highlighting on your Blog

07.09.2010

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 template and linking to someone else’s javascript templates, but it isn’t prett...

815 sym

Install and load R package "Rcmdr" to quickly install lots of other packages

21.09.2010

I recently reformatted my laptop and needed to reinstall R and all the packages that I regularly use. In a previous post I covered R Commander, a nice GUI for R that includes a decent data editor and menus for graphics and basic statistical analysis. Since Rcmdr depends on many other packages, installing and loading Rcmdr like this…...

815 sym

Syntax Highlighting R Code, Revisited

17.11.2010

A few months ago I showed you how to syntax-highlight R code using Github Gists for displaying R code on your blog or other online medium. The idea’s really simple if you use blogger – head over to gist.github.com, paste in your R code, create a public “gist”, hit “embed”, then copy the javascript onto your blog. However, ...

816 sym

Using the "Divide by 4 Rule" to Interpret Logistic Regression Coefficients

06.12.2010

I was recently reading a bit about logistic regression in a book on hierarchical/multilevel modeling when I first learned about the “divide by 4 rule” for quickly interpreting coefficients in a logistic regression model in terms of the predicted probabilities of the outcome. The idea is pretty simple. The logistic curve (predicted...

817 sym

Webinar on Revolution R Enterprise

07.12.2010

R evangelist David Smith, marketing VP at Revolution R, will be giving a webinar showing off some of the finer features of Revolution R Enterprise – an integrated development environment (IDE) for R that has an enhanced script editor with syntax highlighting, function completion, suntax checking, mouseover help, R code snippets for ...

812 sym