Shigeru Mase wrote:
But, if it has no quotation marks or contains spaces, it yileds an error.
as.character(substitute((def x1 x2))
Error: syntax error
He wants to use the syntax like lc((def x1 x2)), not like lc("(def x1 x2)").
No, that wouldn't be possible. Since lc((def x1 x2)) is not legal S language, the parser is going to complain about it. The only solution here would be to parse the whole thing yourself (i.e. parse the R source), rather than using the R parser.
Duncan Murdoch
______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html