Is it possible to group by two columns? So the cross product is drawn
by geom_point()
and geom_smooth()
?
As example:
frame <- data.frame(
series <- rep(c('a', 'b'), 6),
sample <- rep(c('glass','water', 'metal'), 4),
data <- c(1:12))
ggplot(frame, aes()) # ...
Such that the points 6
and 12
share a group, but not with 3
.