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))
> MyValuesMelt <- melt(MyValues, id.var = "Gene")
> ggplot(MyValuesMelt, aes(x = Gene, y = value, fill = variable)) +
> geom_bar(position = "dodge")
> ggplot(MyValuesMelt, aes(x = Gene, y = value)) + geom_bar(position =
> "dodge") + facet_grid(. ~ variable)
>

Hi Thierry,
Splendid! It is exactly what I wanted.
Now, I am actually studying your reply to understand what those
commands *actually* do.

Thanks a lot,
Sincerely Yours,
Senthil

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to