[R] boxplot
R. Michael Weylandt
michael.weylandt at gmail.com
Fri Oct 14 04:23:22 CEST 2011
I'm not sure what the "column to identify other the other columns"
maps to graphically, but perhaps something like this will get you
started
V <- read.table(textConnection("
4 5 6 7 8 site
23 56 41 45 63 C
21 89 42 10 63 E
32 45 14 17 96 E
45 74 13 63 41 C
68 32 10 20 03 E
95 10 84 45 96 C
"),header=TRUE)
closeAllConnections()
boxplot(V[,1:5], col = ifelse(V[,6] == "C", 2,3))
Michael
On Thu, Oct 13, 2011 at 5:54 PM, Ruth Arias <rueu_ac at yahoo.es> wrote:
> hello
>
> I want to make a boxplot with diferents rows and also include a column to sort into two groups to each of the other columns
>
> my date set looks like this:
>
> 4 5 6 7 8 site
> 23 56 41 45 63 C
>
> 21 89 42 10 63 E
>
> 32 45 14 17 96 E
>
> 45 74 13 63 41 C
>
> 68 32 10 20 03 E
>
> 95 10 84 45 96 C
>
> THANKS
>
> [[alternative HTML version deleted]]
>
>
> ______________________________________________
> 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.
>
>
More information about the R-help
mailing list