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
2009-02-06 16:00:27
+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
2009-07-31 19:37:52
Lovely, thanks!
CassJ
2009-08-07 21:45:12