library(ggplot2)
label <- 'one joule (Omega) ~ 1 kg*m^2./s^2'
label <- as_spork(label)
label <- as_plotmath(label)
label <- as.expression(label)
x <- data.frame(y=1:10, x=1:10)
p <- ggplot(x, aes(x, y))
p$labels$x <- label
print(p)
Run the code above in your browser using DataLab