Suppose I have the data and plot as follows:
mydata = data.frame(x=rnorm(4), y=runif(4), tau=c(0,0,1,1))
ggplot(mydata) + geom_point(aes(x=x, y=y)) + facet_wrap(
There is an easier solution to this. The simulated data variable names have been changed for clarity in how they work within the labeller argument.
mydata = data.frame(x=rnorm(4), y=runif(4), tauvar=c(0,0,1,1),sigmavar=c(2,2,3,3))
ggplot(mydata) +
geom_point(aes(x=x, y=y)) +
facet_grid(sigmavar ~ tauvar,labeller = label_bquote(sigma==.(sigmavar),
tau==.(tauvar)))