Re: [R] barplot names.arg

2011-11-11 Thread David L Carlson
1:10 PM To: R. Michael Weylandt Cc: r-help@r-project.org Subject: Re: [R] barplot names.arg The documentation for bar plots includes - names.arga vector of names to be plotted below each bar or *group of bars*. If this argument is omitted, then the names are taken from the names attribute of heigh

Re: [R] barplot names.arg

2011-11-10 Thread Diviya Smith
The documentation for bar plots includes - names.arga vector of names to be plotted below each bar or *group of bars*. If this argument is omitted, then the names are taken from the names attribute of height if this is a vector, or the column names if it is a matrix Thanks for your suggestion. Ho

Re: [R] barplot names.arg

2011-11-10 Thread R. Michael Weylandt
I'm not sure you can do that data aggregation in barplot directly (a quick skim doesn't reveal anything in the documentation that suggests it to me, thought I might have missed it) though I think this does what you are talking about: barplot(sapply(unique(rownames(mdat)), function(n) colSums(mdat[

[R] barplot names.arg

2011-11-10 Thread Diviya Smith
Hello there, I have a question regarding bar plots. I am trying to plot the data from the following matrix as a barplot - # input data mdat <- matrix(c(0.1,0.9,0.9,0.1,0.5,0.5,0.45,1-0.45,0.6,0.4,0.8,0.2), nrow = 6, ncol=2, byrow=TRUE, +dimnames = list(c("Mon", "Mon", "Tues", "Tue