tags:

views:

228

answers:

2

Anyone know if R has quote-like operators like Perl's qw() for generating character vectors?

+4  A: 

I don't think so.

From An Introduction to R Programming:

Character vectors commonly arise in R. They can be entered with either double (") or single (’) quotes.

Stephen Pape
+8  A: 

No, but you can write it yourself:

q <- function(...) {
  sapply(match.call()[-1], deparse)
}

And just to show it works:

> q(a, b, c)
[1] "a" "b" "c"
hadley
Lovely, thanks!
CassJ