[R] Math Expression and Variable Value in Title

Wolfgang Viechtbauer wviechtb at cyrus.psych.uiuc.edu
Wed Jan 28 23:21:07 CET 2004

Hello All,

I am trying to put a math expression into a plot title and at the same
time, I want a value in the title to depend on a variable that I set

Simple Example:

n <- 20
plot(0, 0)
title(expression(paste(n[i], " = ", n)))

Obviously, I want "n_i = 20". How can I get that?

Thanks in advance,

Wolfgang Viechtbauer

More information about the R-help mailing list