Re: [R] Matrix barplot

From: Andreas Tille <tillea_at_rki.de>
Date: Fri, 25 Jul 2008 15:12:32 +0200 (CEST)

On Fri, 25 Jul 2008, Nutter, Benjamin wrote:

>> data <- data.frame(Year=c(2000,2001,2002),
> A=c(4,2,1),
> B=c(3,1,2),
> C=c(0,3,5))
>
>> data.mat <- as.matrix(data)[,2:4]
>> rownames(data.mat) <- data$Year
>> data.mat <- t(data.mat)
>> barplot(data.mat,beside=TRUE)

Thanks a lot

          Andreas.

-- 
http://fam-tille.de

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 25 Jul 2008 - 13:16:06 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Jul 2008 - 13:32:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive