I\'m trying to plot a boxplot graph with my data, using \'ggplot\' in R, but I just can\'t do it. Can anyone help me out? The data is like the table below:
P
ggplot2
requires data in a specific format. Here, you need x=
and y=
where y
will be the values and x
will be the corresponding column ids. Use melt
from reshape2
package to melt
the data to get the data in this format and then plot.
require(reshape2)
ggplot(data = melt(dd), aes(x=variable, y=value)) + geom_boxplot(aes(fill=variable))