Re: [R] question on formula and terms.formula()

2011-07-14 Thread William Dunlap
-project.org Subject: RE: [R] question on formula and terms.formula() Thank you so much for your suggestion, Bill. The R program I try to modify needs match.call() for something else. But the problem does seem to be caused by this statement as you suggested. Following this clue, I find out

Re: [R] question on formula and terms.formula()

2011-07-14 Thread Pang Du
for terms.formula(mf$formula). Pang Du Virginia Tech -Original Message- From: William Dunlap [mailto:wdun...@tibco.com] Sent: Wednesday, July 13, 2011 12:21 PM To: pan...@vt.edu; r-help@r-project.org Subject: RE: [R] question on formula and terms.formula() Does your code work if you omit the match.call

Re: [R] question on formula and terms.formula()

2011-07-14 Thread Pang Du
Points taken and terms(formula) is used now. Thanks. -Original Message- From: William Dunlap [mailto:wdun...@tibco.com] Sent: Thursday, July 14, 2011 11:56 AM To: Pang Du; r-help@r-project.org Subject: RE: [R] question on formula and terms.formula() I think you should replace

Re: [R] question on formula and terms.formula()

2011-07-13 Thread William Dunlap
-project.org] on behalf of pan...@vt.edu [pan...@vt.edu] Sent: Tuesday, July 12, 2011 8:40 PM To: r-help@r-project.org Subject: [R] question on formula and terms.formula() I'm trying to create a formula object to pass on to a function that applies the function terms.formula() to it. f - function

[R] question on formula and terms.formula()

2011-07-12 Thread pangdu
I'm trying to create a formula object to pass on to a function that applies the function terms.formula() to it. f - function(formula, ...) { ... mf - match.call() term - terms.formula(mf$formula) ... } However, my code below gives an error. form - as.formula(y~x) f(form, ...) The error