[R] Boxplot

Benjamin Dickgiesser dickgiesser at gmail.com
Tue Nov 7 15:25:38 CET 2006


Ah I think I've got it:

boxplot(Y ~ Batch, data=data, horizontal=T,xlab="Y", ylab="Batch")


On 11/7/06, Benjamin Dickgiesser <dickgiesser at gmail.com> wrote:
> Hi,
> I am new to R and am still trying to get a grip of it.
>
> I have data in this format:
>
>     Run Lab Batch  Y
> 1     1   1     1 608.781
> 2     2   1     2 569.670
> 3     3   1     1 689.556
> 4     4   1     2 747.541
> 5     5   1     1 618.134
> 6     6   1     2 612.182
> 7     7   1     1 680.203
> 8     8   1     2 607.766
> 9     9   1     1 726.232
>
> and I want to make a boxplot of the Y values for each Batch. How would
> I go about this?
> I tried
> boxplot(data.ceramic[ data.ceramic$Batch == "1", ]$Y ~ data.ceramic[
> data.ceramic$Batch == "2", ]$Y, horizontal=T,xlab="Y", ylab="Batch")
>
> but was completley wrong
>
> Thank you for your help.
>
> Ben
>



More information about the R-help mailing list