R - Interpreting a subscript in a variable used in ggplot
问题 I'm using ggplot to do some multiline plots that are constructed with lots of variables and the use of paste. I have not been able to figure out how to get the subscript 3 in O3 to appear in the following simplified version of the code. gasSubscript <- "O[3]" color1 <- paste(gasSubscript,"some additional text") df <- data.frame(x = c(1,2,3,4,5,6,7,8,9,10), y = c(10,9,8,7,6,5,4,3,2,1)) testPlot <- ggplot(data = df, aes(x = x)) + geom_line(aes(y = y, color = color1)) color1 contains "O[3] some