[R] multiple boxplots using boxplot

Matthias Kohl Matthias.Kohl at stamats.de
Sat Mar 1 17:03:37 CET 2008


Hi Marek,

use a list instead of a data.frame; e.g.

boxplot(list(x = rnorm(10), y = rnorm(20)))

hth,
Matthias

Marek Bartkuhn wrote:
> Hi,
>
> I have data in 3 vectors a,b and c looking like
>
> eg  a: 		1.2		3.4		1.4 ......
>
>
> I like to have the data from each vector as a boxplot, but the 3  
> boxplots within one graph.
>
> One example is the first graph  at
>
> http://www.statmethods.net/graphs/boxplot.html
>
> Unfortunately I do not really understand the corresponding  
> description. The vectors are of different length, therefore R  
> complains when I try to build a data.frame of the 3 vectors:
>
> arguments imply differing number of rows: 6175, 20, 190
>
> What do I have to do?
>
> Marek
>
> ______________________________________________
> 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.
>   

-- 
Dr. Matthias Kohl
www.stamats.de



More information about the R-help mailing list