Dear expeRts, I would like to use expression() for creating labels in a splom, as shown in the first minimal example below. Is there any way I can simplify having to write "expression(italic(...))" several times? The second example is what I tried so far, but I can't manage to get italic() to work. Moreover, it still seems bulky...
Cheers, Marius ## minimal example (working but bulky) U <- matrix(runif(900),ncol=3) lattice::splom(~U[,1:3],varnames = c(expression(italic(U[1])),expression(italic(U[2])),expression(italic(U[3])))) ## also bulky (and does not incorporate italic()) f <- function(x){ do.call(expression, lapply(1:3, function(j) substitute(x[y], list(x = as.name(x), y = 0+j)))) } lattice::splom(~U[,1:3],varnames = f("U")) ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.