[Solved] Comparing multiple data frames


Here are a couple of ideas.

This is what I think your data look like?

before <- data.frame(val=c(11330,2721,52438,6124),
                     lab=c("STAT1","STAT2","STAT3","SUZY"))
after <- data.frame(val=c(17401,3462,0,72),
                     lab=c("STAT1","STAT2","STAT3","SUZY"))

Combine them into a single data frame with a period variable:

combined <- rbind(data.frame(before,period="before"),
      data.frame(after,period="after"))

Reformat to a matrix and plot with (base R) dotchart:

library(reshape2)
m <- acast(combined,lab~period,value.var="val")
dotchart(m)

Plot with ggplot:

library(ggplot2)
qplot(lab,val,colour=period,data=combined)

2

solved Comparing multiple data frames