Posts Tagged ‘ Tutorials ’

GWAS Manhattan plots and QQ plots using ggplot2 in R

January 20, 2010
By

Will posted earlier this week about how to produce manhattan plots of GWAS results using Stata, so I thought I'd share how I do this in R using ggplot2. First, if you've never used ggplot2, you'll need to add it to your R installation by typing: install.packages("ggplot2") Once you've done that, copy and paste this command to download the functions I wrote...

Read more »

Coming to R from SQL, Python, SAS, Matlab, or Lisp

January 18, 2010
By

Head over to Revolutions Blog for a list of PDF and powerpoint resources for making the transition to R from other programming or stats languages.  All of these notes come from the New York R meetup. I enjoyed browsing the meetup's files - lots of powerpoints, PDFs, and example R data files for various topics, including several slideshows on...

Read more »

ggplot2 Tutorial: Scatterplots in a Series of Small Multiples

January 11, 2010
By

It took several months after learning about ggplot2 before I gave it a try myself.  I was apprehensive about learning a new graphics system with a new set of commands.  Thing is, if you've ever used plot() in R, you already know how to use much of the functionality in ggplot2!  In this tutorial I want to show you...

Read more »

R examine objects tutorial

November 21, 2009
By
R examine objects tutorial

This article is quick concrete example of how to use the techniques from Survive R to lower the steepness of The R Project for Statistical Computing‘s learning curve (so an apology to all readers who are not interested in R). What follows is for people who already use R and want to achieve more control Related posts:

Read more »

QQ plots of p-values in R using ggplot2

November 9, 2009
By

Way back will wrote on this topic.  See his previous post for Stata code for doing this.  Unfortunately the R package that was used to create QQ-plots here has been removed from CRAN, so I wrote my own using ggplot2 and some code I received from Daniel Shriner at NHGRI. Of course you can use R's built-in qqplot() function, but...

Read more »

Split, apply, and combine in R using PLYR

November 4, 2009
By

While flirting around with previously mentioned ggplot2 I came across an incredibly useful set of functions in the plyr package, made by Hadley Wickham, the same guy behind ggplot2.  If you've ever used MySQL before, think of "GROUP BY", but here you can arbitrarily apply any R function to splits of the data, or write one yourself. Imagine you have...

Read more »

Visualizing sample relatedness in a GWAS using PLINK and R

October 9, 2009
By

Strict quality control procedures are extremely important for any genome-wide association study.  One of the first steps you should take when running QC on your GWAS is to look for related samples in your dataset.  This does two things for you.  First, you can get an idea of how many related samples you have in your dataset, and second,...

Read more »

Getting help with R

July 2, 2009
By

There's no doubt that by now you've noticed that we're big fans of R around here. It's completely free, has superior graphing capabilities, and with all the extension packages available there isn't much it can't do. One of the problems with R especially to new users is that it isn't obvious how to find help when you...

Read more »

Weekly R Clinic

June 24, 2009
By

For readers at Vanderbilt: At yesterday's R course I found out that Theresa Scott in the Biostatistics department holds a weekly R clinic and encourages new R users who want to learn more to bring any questions about R, or even your own code and data. The R clinic is held weekly on Thursday from 2:00-3:00 in MCN....

Read more »

PDF tutorial from R course (Introduction to R)

June 23, 2009
By

Writing from the previously mentioned intro to R course at the Kennedy Center. If you couldn't make it you can download all the course materials from Theresa Scott's website, under the "Current Teaching Material" heading. Here is a direct link to the PDF for the overview materials that we're going over today, along with the R code...

Read more »