I\'m trying to place the results of a regression (i.e., R2) in a graph, but can\'t seem to figure out how to call a variable from within an expression (it pastes the variabl
To combine substitute() and paste(), I use the following code;
substitute()
paste()
waic <-1; chisquare <-2; plot(x=1:2,y=1:2, main = substitute(paste( "chi^2 goodness of fit ", chi^2*(D/theta) , "=", chisquare , ". WAIC =",waic), list(chisquare=chisquare,waic=waic) ) )
The result is the following;