Posts Tagged ‘ ggplot2 ’

Top Five Open Source Projects of 2009

November 5, 2009
By

Every year, I single out what I think are the Top Five open source projects. This year, there's only one hold-over from previous years, and it's likely that I'm just going to give it a Lifetime Achievement Award and pick five others next year. 5. NetBe...

Read more »

ggplot2: Two Color XY-Area Combo Chart

October 21, 2009
By
ggplot2: Two Color XY-Area Combo Chart

David@Work blog shows how to fill in the area between two crossing lines in an Excel chart. This post was also published as a guest-post on PTS blog. Let’s try to replicate this graph in ggplot2. First, load ggplot2 and generate the data frame to be used in the example (I am using a slightly

Read more »

Investigation the relationship between two variables using a scatter plot

October 13, 2009
By
Investigation the relationship between two variables using a scatter plot

The relationship between two variables can be visually represented using a scatter plot and will provide some insight into the correlation between the variables and possible models to describe the relationship. There are different ways to produce scatter plots in R making use of either the base graphics system, the lattice graphics library, ggplot2 or

Read more »

50000 Revisions Committed to R

October 10, 2009
By
50000 Revisions Committed to R

oday Romain Francois posted an interesting topic in the R-help list, and you can read his blog post for more details: celebrating R commit #50000. 50000 is certainly not a small number; we do owe R core members a big “thank you” for their great efforts in this fantastic statistical language in the 13 years.

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 »

ggplot2: Back-to-back Bar Charts

September 23, 2009
By
ggplot2: Back-to-back Bar Charts

On the ggplot2 mailing-list the following question was asked: How to create a back-to-back bar chart with ggplot2? For anyone who don’t know what I am talking about, have a look on a recent paper from the EU. I’d like to create plots like the graphs 5,6,18 in the paper. An example graph from the above report is

Read more »

ggplot2: Back-to-back Bar Charts

September 23, 2009
By
ggplot2: Back-to-back Bar Charts

On the ggplot2 mailing-list the following question was asked: How to create a back-to-back bar chart with ggplot2? For anyone who don’t know what I am talking about, have a look on a recent paper from the EU. I’d like to create plots like the graph...

Read more »

Comparison of plots using Stata, R base, R lattice, and R ggplot2, Part I: Histograms

September 21, 2009
By

One of the nicer things about many statistics packages is the extremely granular control you get over your graphical output.  But I lack the patience to set dozens of command line flags in R, and I'd rather not power the computer by pumping the mouse trying to set all the clicky-box options in Stata's graphics editor.  I want something...

Read more »

brew: Creating Repetitive Reports

September 9, 2009
By
brew: Creating Repetitive Reports

United Nations report World Population Prospects: The 2008 Revision (highlights available here) provides data about the historical and forecasted population of the country. In exploring the future and past population trends it is relatively easy to subset the dataset by your selected variable. > file <- c("UNdata_Population.csv") > population <- read.csv(file) > names(population) <- c("code", "country", "year", +

Read more »

Let’s All Go Down to the Barplot!

September 3, 2009
By
Let’s All Go Down to the Barplot!

I’m back for another pean to ANOVA-loving experimental ecology. Barplots (or point-range plots – but which is better is a discussion for a different time) are the thing! And a friend of mine was recently asking me how to do a decent barplot with ggplot2 for data of moderate complexity (e.g., a 2-way ANOVA). So

Read more »