Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>library(ggplot2) library(plyr) # a faceting approach df2 &lt;- ddply(df, .(Field, AgeRange), summarise, mscore = mean(Score)) ggplot(df2, aes(x=AgeRange, y = mscore, fill = AgeRange)) + geom_bar( stat = "identity" ) + facet_wrap(~Field) # good enough? </code></pre> <p><img src="https://i.stack.imgur.com/1N5lR.jpg" alt="enter image description here"></p> <pre><code> df &lt;- structure(list(field = structure(c(3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), class = "factor", .Label = c("C", "M", "P")), agerange = structure(c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L), .Label = c("18", "36", "54"), class = "factor"), score = c(7.30127138725929, 7.37770686922096, 7.41317998674043, 6.64841878521039, 7.86711279540953, 7.17048025193224, 8.44148594576163, 8.13949581473566, 6.30312423530373, 6.78529906805563, 8.60960304217661, 7.08300936020387, 7.33518750196135, 7.29903060579703, 7.81598828814603, 6.51481883845345, 6.85779851460457, 8.5001156704776, 7.90225168492658, 6.57536590278191, 6.01020914251986, 7.28458327350041, 7.07419918080273, 8.93252585403122, 6.54527682832174, 6.35152240141314, 6.75924970388344, 7.30127138725929, 7.37770686922096, 7.41317998674043, 6.64841878521039, 7.86711279540953, 7.17048025193224, 8.44148594576163, 8.13949581473566, 6.30312423530373, 6.78529906805563, 8.60960304217661, 7.08300936020387, 7.33518750196135, 7.29903060579703, 7.81598828814603, 6.51481883845345, 6.85779851460457, 8.5001156704776, 7.90225168492658, 6.57536590278191, 6.01020914251986, 7.28458327350041, 7.07419918080273, 8.93252585403122, 6.54527682832174, 6.35152240141314, 6.75924970388344, 7.30127138725929, 7.37770686922096, 7.41317998674043, 6.64841878521039, 7.86711279540953, 7.17048025193224, 8.44148594576163, 8.13949581473566, 6.30312423530373, 6.78529906805563, 8.60960304217661, 7.08300936020387, 7.33518750196135, 7.29903060579703, 7.81598828814603, 6.51481883845345, 6.85779851460457, 8.5001156704776, 7.90225168492658, 6.57536590278191, 6.01020914251986, 7.28458327350041, 7.07419918080273, 8.93252585403122, 6.54527682832174, 6.35152240141314, 6.75924970388344), test = structure(c(1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L ), class = "factor", .Label = c("A", "B", "C"))), .Names = c("field", "agerange", "score", "test"), row.names = c(NA, -81L), class = "data.frame") </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload