[R] quotes within quotes
spencer.graves at pdf.com
Wed Apr 9 01:15:55 CEST 2003
(a) Use single and double qoutes, e.g., "'" is the character string
consisting of a single apostrophe, while '"' is the character string
consisting of a single (double) quote mark.
(b) "\"" == '"'; '\'' == "'"
Also, you example suggests you may wish to try "paste".
janet rosenbaum wrote:
> How does one put quotes within quotes, if it's possible?
> I've tried replacing one set of the quotes by single quotes.
> If it's not possible, is there any way to do the following?
> > cmd <- "read.dta"
> > opt <- "convert.factors=FALSE"
> > data.file <- " file="/full/path/name.dta" "
> > eval(call(cmd,data.file,opt))
> Prior to adding this option, I had been using match.fun to get the
> function call corresponding to cmd and then evaluating it, but match.fun
> doesn't seem to help here.
> R-help at stat.math.ethz.ch mailing list
More information about the R-help