Skip to content

multiple boxplots using boxplot

2 messages · Marek Bartkuhn, Matthias Kohl

#
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
#
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: