Re: [Rd] Problem using model.frame with argument subset in own function

2009-09-10 Thread Greg B. Hill
Gavin, I ran into the same cryptic "invalid subscript type 'closure'" message in a slightly less complicated scenario, and wanted to post the cause in my case (the root cause is probably the same either way). Similarly to your case, I was subsetting a data frame. I had a list of variable names

Re: [Rd] Problem using model.frame with argument subset in own function

2009-08-09 Thread Gavin Simpson
On Sun, 2009-08-09 at 11:32 -0500, Douglas Bates wrote: > On Sat, Aug 8, 2009 at 1:31 PM, Gavin Simpson wrote: > > Dear List, > > > I am writing a formula method for a function in a package I maintain. I > > want the method to return a data.frame that potentially only contains > > some of the vari

Re: [Rd] Problem using model.frame with argument subset in own function

2009-08-09 Thread Douglas Bates
On Sat, Aug 8, 2009 at 1:31 PM, Gavin Simpson wrote: > Dear List, > I am writing a formula method for a function in a package I maintain. I > want the method to return a data.frame that potentially only contains > some of the variables in 'data', as specified by the formula. The usual way to call

[Rd] Problem using model.frame with argument subset in own function

2009-08-08 Thread Gavin Simpson
Dear List, I am writing a formula method for a function in a package I maintain. I want the method to return a data.frame that potentially only contains some of the variables in 'data', as specified by the formula. The problem I am having is in writing the function and wrapping it around model.fr