Re: [R] ggplot2: ordering categorial data

2007-10-16 Thread hadley wickham
Hi Christoph, There's a couple of things you need to do. Firstly, you need to reorder the factor according to how you want the data sorted df$tld <- reorder_factor(df$tld, tapply(df$spam1, df$tld, mean)) is one way to do that. The reason that position dodge isn't working for you is because it

Re: [R] ggplot2: ordering categorial data

2007-10-15 Thread Christoph Krammer
ot;Error in as.vector(x, "double") : can not convert to vector" Can anybody help here? Thanks and regards, Christoph -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christoph Krammer Sent: Sunday, October 14, 2007 11:30 AM To: r-help@r-pro

[R] ggplot2: ordering categorial data

2007-10-14 Thread Christoph Krammer
Hello again, everytime I think I got something to work, the next issue comes up... I have the following data.frame, I want to visualize: > data_rb tld spam1 spam2 share 1 ca 826436 73452 0.0889 2 org 470550 25740 0.0547 3 de 156042 15531 0.0995 4 com 140753 7527 0.