[R] barplot
Uwe Ligges
ligges at statistik.uni-dortmund.de
Sat Oct 16 15:38:21 CEST 2004
Sepp Gurgel wrote:
> I have a table
Do you mean a data.frame?
> with two columns, one with types of blood (A, B, AB or 0) and
> one with the factor (negative = -1 or positive = 1).
And from these you made a table?
my.table <- table(my.data.frame)
> How can I combine those two columns so that 7 bars are plotted (A, B, AB, 0,
> -A, -B and -0)?
Now you can say
blood.id <- outer(rownames(my.table), colnames(m.ytable),
paste, sep="")
barplot(as.vector(my.table), names = blood.id)
Uwe Ligges
> --
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list