Hi Hermann,
You can use the mixedsort() function in the gtools package, like this:
library(gtools)
daten$ch <- factor(daten$ch, levels = mixedsort(daten$ch))
qplot (ch, fc, data=daten)
Best,
Ista
On Wed, Sep 5, 2012 at 4:06 PM, Hermann Norpois <
hnor...@googlemail.com> wrote:
> to whom it may concern.
>
> I wish to plot expression levels of genes for each chromosome and get the
> chromomes in asci order. My list:
> ID Chromosome Fold Change
> xy 3 1.5
> zu X 1.8
>
> expect
> the vectors
> id for ID
> ch for Chromosome
> fc for Fold Chane
>
> I tried:
> qplot (ch, fc, data=daten)
>
> Principally the plot is okay but ...
> I get the chromomes on the x-axis in asci order (1, 10 etc). Of course I
> prefer the "classical" order (1,2,...X,Y). How does this work?
> Thanks
> hermann Norpois
>
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example:
>
https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email
ggp...@googlegroups.com
> To unsubscribe: email
ggplot2+u...@googlegroups.com
> More options:
http://groups.google.com/group/ggplot2