Variable in italic for plot title

Here is an example how to plot a title in italic using a variable.

layout(1)
i <- "Caretta caretta"
plot(1, main=substitute(expr = paste("Species name: ", italic(i)), 
                        env = list(i=i)))

Or simpler:

i <- "Caretta caretta"
plot(1, main=bquote("Species name: "*italic(.(i))))

Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

stepAIC from package MASS with AICc

Install treemix in ubuntu 20.04