I tried searching, but this bothers me quite a bit, as it in my opinion should be a simple line of coding. However, i keep getting an error when trying...
Firstly, this code works fine
scale_linetype_manual("",
values=c("pAl"=4,"pAlOH"=3, "pAl7OH17"=6, "pAl13OH34"=2,"pAlOH4"=1,"pAl2OH2"=5),
labels = c(expression("Al"^"3+"),
expression("Al(OH)"^"2+"),
expression("Al7(OH)"[17]^"4+"),
expression("Al13(OH)"[34]^"5+"),
expression("Al(OH)"[4]^"-"),
expression("Al2(OH)"[2]^"4+")))+
I do, however, want some of the numbers after Al to be subscripted too, but when trying
expression("Al"[2]"(OH)"^"2+") or expression("Al" ~ [2] ~ "(OH)" ~ ^ ~ "2+")
or whatever variant i can come up with, i keep getting an error.
Again, there's probably an easy fix. Sorry for my lack of experience in using R :)
