title: R ggplot facet_grid_sc with cols
body: <p>I'm trying to use facet_grid_sc to manipulate the y axis but by plotting the panel column-wise instead of row-wise. I have the following dataframe:</p>
  
  <pre><code>    test2 &lt;- structure(list(stream = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 
  2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 
  4L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L), .Label = c("Feed", "Cells 1-4", 
  "Cells 5-8", "Cells 9-12", "Totalconcentrate", "Tailings"), class = "factor"), 
      mineral = c("Calcite", "Calcite", "Calcite", "Calcite", "Scheelite", 
      "Scheelite", "Scheelite", "Scheelite", "Calcite", "Calcite", 
      "Calcite", "Calcite", "Scheelite", "Scheelite", "Scheelite", 
      "Scheelite", "Calcite", "Calcite", "Calcite", "Calcite", 
      "Scheelite", "Scheelite", "Scheelite", "Scheelite", "Calcite", 
      "Calcite", "Calcite", "Calcite", "Scheelite", "Scheelite", 
      "Scheelite", "Scheelite"), shapefactor = structure(c(3L, 
      1L, 2L, 4L, 3L, 1L, 2L, 4L, 3L, 1L, 2L, 4L, 3L, 1L, 2L, 4L, 
      3L, 1L, 2L, 4L, 3L, 1L, 2L, 4L, 3L, 1L, 2L, 4L, 3L, 1L, 2L, 
      4L), .Label = c("Angularity", "Circularity", "Formfactor", 
      "Roundness"), class = "factor"), mean = c(0.191074267258554, 
      1.57871188864644, 4.98640988695014, 0.709748496492633, 0.255307602333514, 
      1.41318627525434, 4.48236746482907, 0.787906844284224, 0.2370993275776, 
      1.59011418196729, 5.00866589220356, 0.708099932389451, 0.379279621962832, 
      1.41798512797767, 4.49174029724501, 0.803054249581329, 0.188107140488459, 
      1.58446664800185, 4.99394785197469, 0.720664938740251, 0.261663000285933, 
      1.33457686608134, 4.2649277507168, 0.809433325901688, 0.204386468447994, 
      1.55129002878455, 4.88754754288822, 0.761051008277419, 0.432222746956355, 
      1.22012862228623, 3.87276933395819, 0.861599941934953)), .Names = c("stream", 
  "mineral", "shapefactor", "mean"), row.names = c(73L, 74L, 75L, 
  76L, 93L, 94L, 95L, 96L, 125L, 126L, 127L, 128L, 145L, 146L, 
  147L, 148L, 177L, 178L, 179L, 180L, 197L, 198L, 199L, 200L, 281L, 
  282L, 283L, 284L, 301L, 302L, 303L, 304L), class = "data.frame")
  </code></pre>
  
  <p>I plot it using the following code:</p>
  
  <pre><code>scales_y &lt;- list(
    "Angularity" = scale_y_continuous(limits = c(0.5,2)),
    "Circularity" = scale_y_continuous(limits = c(2,5.5)),
    "Formfactor" = scale_y_continuous(limits = c(0,0.5)),
    "Roundness" = scale_y_continuous(limits = c(0.6,0.9))
  )
  
  g &lt;- ggplot(test2, aes(x=stream, y=mean, color=mineral, group=mineral))
  g &lt;- g + geom_point()
  g &lt;- g + geom_line()
  g &lt;- g + theme_bw()
  g &lt;- g + theme(axis.text.x = element_text(size =8),
                 axis.ticks.x=element_blank(),
                 legend.position="bottom")
  g &lt;- g + scale_color_brewer(palette = "Paired")
  g &lt;- g + facet_grid_sc(rows = vars(shapefactor), scales = list(y = scales_y))
  print(g)
  </code></pre>
  
  <p>This works fine. However, if I want to plot the shapefactor in columns instead of rows (so writing facet_grid_sc(cols = vars(shapefactor), scales = list(y = scales_y))), then I get this error message:</p>
  
  <blockquote>
    <p>Error in .subset2(x, i, exact = exact) :    attempt to select less
    than one element in get1index</p>
  </blockquote>
  
  <p>I'm probably writing this wrong, but I can't find in the help of the package how to write it properly. Can anyone help me please?</p>
  
  <p>Thanks in advance!</p>
  
  <p>Nath</p>