Re: [R] Convert an expression to a function

2010-08-02 Thread William Dunlap
Software wdunlap tibco.com > -----Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of > w...@mtmail.mtsu.edu > Sent: Sunday, August 01, 2010 8:02 PM > To: R-help@r-project.org > Subject: [R] Convert an expression

[R] Convert an expression to a function

2010-08-01 Thread wg2f
Hi John, Here is my code practicing. Please give me some advises. Thank you. Wu Gong # Extract the function string f.str <- sub("y~","",exprtext) # Get arglist from the text sp1 <- paste("\\",c(getGroupMembers(Arith),"(",")"),sep="") sp2 <- getGroupMembers(Math) sps <- paste(c(sp1,sp2),sep="",c