I have a table with two columns, one with types of blood (A, B, AB or 0) and one with the factor (negative = -1 or positive = 1). How can I combine those two columns so that 7 bars are plotted (A, B, AB, 0, -A, -B and -0)? --
Sepp Gurgel wrote:> I have a tableDo 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 > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! R-project.org/posting-guide.html