library(ggplot2)
p <- ggplot(mpg, aes(displ, hwy)) + geom_point()
# Use vars() to supply faceting variables:
p + facet_wrap(vars(class))
Sample code above makes a facet grid. How can it be possible to specify which variables are in each rows, for example if I want:
"2seater" and "compact" in row 1--
"midsize" and "minivan" and "pickup" and "subcompact" in row 2--
and "suv" in row 3.
Lastly, can it be possible to add a word the left hand side before each row of plots that describes the series of plots, for example "ROW A" for row 1--"ROW B" for row 2-- "ROW C" for row 3.
Desired/sample output shown below