[R] How to use ggplot2
jarod_v6 at libero.it
jarod_v6 at libero.it
Wed Nov 26 18:04:21 CET 2014
Dear All!!
I'll try to plot a barplot using aggplot2
head(alt)
as.factor.data...7.. Col ColMat Fastq miseq
1 189 158 158 158 104
2 190 54272 54272 54272 32122
3 191 301574 301574 301574 152625
4 192 161620 161620 161620 100469
5 193 61263 61263 61263 38109
6 194 83800 83800 83800 40095
>
p<- ggplot(data = alt, aes(y = alt[,2])) + geom_bar()
Error : Mapping a variable to y and also using stat="bin".
With stat="bin", it will attempt to set the y value to the count of cases in each group.
This can result in unexpected behavior and will not be allowed in a future version of ggplot2.
If you want y to represent counts of cases, use stat="bin" and don't map a variable to y.
If you want y to represent values in the data, use stat="identity".
See ?geom_bar for examples. (Defunct; last used in version 0.9.2)
How can resolve this problem?
My data are in column: each columns are conditions and each row rappresnt a sample
thanks for your help!
M
[[alternative HTML version deleted]]
More information about the R-help
mailing list