I have the following ggplot I was able to make in R:
x = 1:5
y = 6:10
df = data.frame(x,y)
ggplot(df, aes(x,y)) + labs(x = expression("1-dpi [2] Log"))
I'd like to use the 2 as a subscript but the expression function is not working for me for some reason. Would someone know how to troubleshoot? Thanks
Edit:
I was able to write the whole title out. my desired final title was: 1 dpi Log[2] Fold Change
My code for that is:
expression(1~dpi~Log[2]~Fold~Change)