Re: [R] passing formula arg to mgcv::gam

2004-09-28 Thread Thomas Lumley
I think that this should work in gam(), but in any case a fix is to put the subset variable into the data frame. The formula interface works best this way. In your example you could add idx=1:100 to the data frame and then use subset=idx %in% 1:10 -thomas On Mon, 27 Sep 2004, Vadim

RE: [R] passing formula arg to mgcv::gam

2004-09-27 Thread Vadim Ogranovich
This is a self-response :-). It was indeed a problem with environments. One way to get around is to reset the environment, e.g. inside callGam do formula - as.formula(unclass(formula)) Not too aesthetic, but works. Is there a less kludgy way to do this? BTW, forgot to mention. This is

Re: [R] passing formula arg to mgcv::gam

2004-09-27 Thread Gabor Grothendieck
How about environment(formula) - environment() Vadim Ogranovich vograno at evafunds.com writes: : : This is a self-response . : : It was indeed a problem with environments. One way to get around is to reset the environment, e.g. inside : callGam do : formula -