boxplot - R box plot using factors in multiple columns -
I'm trying to see my data using R box plot and got stuck. My data looks as follows:
id var.1 var.2 ... var.n Price 0 0 ... 2 1.7b2 1 ... 0 1.4 .... .. ... ... ... ... a 1 2 ... 2 5.3 b1 2 ... 1 2.4
Now, I have a series of Boxplots: Value ~ var.1, value ~ var.2, ..., value ~ var.n preferably a ggplot2 aspect type plot.
I think the data should be redone again:
a var.1 0 1.7 a var.2 1 1.7 ... b var .1 2 1.4 b var.2 1 1.4 ...
so that I can see the usage dialogue column 2 & amp; 3 ...
You can also use the melting function:
< Code> library (Reshape2) melt value (dat, id = 'value') value value 1 -0.11978146 var.1 1 2 -0.78996525 var.1 1 3 0.54246428 var.1 1 4 0.09325227 var.1 1 5 0.63954407 var.1 1 6 1.48611802 Var.1 1 ...
Comments
Post a Comment