--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
Is this what you want? You can also use any name instead of “id”.
d <- data.frame(id=c("NA18909","NA06985","NA18593","NA18505")
,group1=c(0.00001,0.99999,0.00001,0.00001)
,group2=c(0.99999,0.00001,0.99999,0.99999)
)
> d
id group1 group2
1 NA18909 0.00001 0.99999
2 NA06985 0.99999 0.00001
3 NA18593 0.00001 0.99999
4 NA18505 0.00001 0.99999
> melt(d, measure.var=c("group1","group2"))
id variable value
1 NA18909 group1 0.00001
2 NA06985 group1 0.99999
3 NA18593 group1 0.00001
4 NA18505 group1 0.00001
5 NA18909 group2 0.99999
6 NA06985 group2 0.00001
7 NA18593 group2 0.99999
8 NA18505 group2 0.99999
Kaori Ito
Pfizer Inc
Groton, CT USA