Re: [R] Histogram/Bar plot graph

2008-02-06 Thread Senthil Kumar M
On Feb 6, 2008 2:35 AM, ONKELINX, Thierry <[EMAIL PROTECTED]> wrote: > You'll need to transform your dataset in a long format first. > > library(ggplot2) > n <- 5 > MyValues <- data.frame(Gene = factor(LETTERS[seq_len(n)]), ES = > rnorm(n), MEF = rnorm(n), Embrio = rnorm(n), EShyp = rnorm(n)) > MyV

Re: [R] Histogram/Bar plot graph

2008-02-06 Thread ONKELINX, Thierry
You'll need to transform your dataset in a long format first. library(ggplot2) n <- 5 MyValues <- data.frame(Gene = factor(LETTERS[seq_len(n)]), ES = rnorm(n), MEF = rnorm(n), Embrio = rnorm(n), EShyp = rnorm(n)) MyValuesMelt <- melt(MyValues, id.var = "Gene") ggplot(MyValuesMelt, aes(x = Gene, y