[R] How to paste a vector of expressions and a character vector?

From: Marius Hofert <m_hofert_at_web.de>
Date: Fri, 01 Apr 2011 18:32:39 +0200

Dear expeRts,

I know I can't paste expressions in the normal way, but I just couldn't figure out how to get the following (I want to paste a character vector to an expression vector) right with bquote() or substitute.

vec1 <- c("a", expression(tilde(b)), "c")
vec2 <- c("1", "2", "3")
main <- as.expression(paste(vec1, vec2))
plot(0,0, main=main[2])



R-help_at_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. Received on Fri 01 Apr 2011 - 16:34:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 01 Apr 2011 - 17:40:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive