I have a dataset for which I am trying to generate grouped boxplots. The y-axis should be the values, x the type of events and then the boxplots will be grouped into when the values were taken (either 24hrs prior to event or on admission).
What I've done thus far is read the data to 'data' and then
data.m <- melt(data)
p <- ggplot(data.m, aes(factor(Type), Value)) + geom_boxplot(aes(fill = Time))
This is what I'm getting.
I'm not sure what I'm doing wrong, any help greatly appreciated.