Multiple Boxplot in R from a matrix, grouped by the values of a particular column.
eg.
M= matrix(c(1,2,1,3,2,3,1,4,2,5,3,5,2,6),ncol=2)
ie.
[,1] [,2]
[1,] 1 4
[2,] 2 2
[3,] 1 5
[4,] 3 3
[5,] 2 5
[6,] 3 2
[7,] 1 6
Now I want a graph with boxplots for each distinct value of column one. i.e. there should be three boxplots viz. for 1,2,3(distinct col. 1 values)
Thanks.