Skip to content

math-type label

2 messages · Ardia David, Uwe Ligges

#
Dear all,
I would like to create a math-type label like this one:

c(expression(theta[1]), expression(theta[2]), ..., expression(theta[N]))

How can I do that in an automatic way (i.e., for any dimension N). I 
tried with a "for" loop, but also need to used substitute I guess. Any idea?
Thanks a lot,
David
#
Ardia David wrote:
Example:


plot(1:10, xaxt="n")
here <- 1:10
axis(1, at = here,
     do.call("expression",
         lapply(here, function(j)
             substitute(theta[i], list(i=j)))))


Uwe Ligges