[R] How to extract function arguments literally

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sat Apr 30 09:15:27 CEST 2005


Shigeru Mase <mase at is.titech.ac.jp> writes:

> 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)").

This is not possible. R expressions must follow R syntax.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list