I would like to use exponents and variables in the title of my plot.
I tried to use "expression()", but when it is inside a "paste()" method, it prints the literal text, i.e. Volume: paste("Volume(",m^{3},")"). When I use the variable names inside "expression()" the exponent works, but it prints the variable name, i.e. "location" instead of "California".
ggtitle(expression(paste(location,
"\nMax Volume Cut-off:", paste(max_volume_criteria, "(", m^{3}, ")"),
"\nVolume Percent Decrease:", criteria, sep=" ")))
I am not sure how to get the exponents and the variable names to work at the same time.