I want to have a new line in my bquote envrionment, how can I do this?
my code:
test<-c(1,2,3,4,4.5,3.5,5.6)
test2<-0.033111111
pl
I wanted this but left aligned. After searching for solutions I ended up using two text() calls set up to put the text 0.25 inch apart and 0.25 in from top regardless of the plot dimensions.
plot(1:100)
r2 <- 40.2
rmse <- 0.6
ll = bquote(paste(italic(R)^2," = ",.(r2)," RMSE = ",.(rmse)))
val=0.25*diff(par('usr')[3:4])/par('pin')[2]
text(par('usr')[1], par('usr')[4] - val, pos=4, labels=ll)
text(par('usr')[1], par('usr')[4] - 2*val, pos=4, labels="Model A")
Image produced by code