Re: [Rd] model.frame() call from inside a function (PR#3671)

2003-08-14 Thread Peter Dalgaard BSA
[EMAIL PROTECTED] writes: > R version: 1.7.1 > OS: Red Hat Linux 7.2 > > Hi all, > > The formula object in model.frame() is not retrieved properly when > model.frame() is called from within a function and the "subset" argument > is supplied. > > foo <- function(formula,data,subset=NULL) > { >

Re: [Rd] model.frame() call from inside a function (PR#3671)

2003-08-14 Thread Saikat DebRoy
That attachment disappeared from the previous mail. Here is the patch I mentioned. diff -Naur src/library/nls/R/nls.R /tmp/R/nls.R --- src/library/nls/R/nls.R Mon Jul 28 11:11:06 2003 +++ /tmp/R/nls.RThu Aug 7 10:04:49 2003 @@ -38,7 +38,7 @@ nlsModel.plinear <- function( form, data,

[Rd] model.frame() call from inside a function (PR#3671)

2003-08-14 Thread jerome
R version: 1.7.1 OS: Red Hat Linux 7.2 Hi all, The formula object in model.frame() is not retrieved properly when model.frame() is called from within a function and the "subset" argument is supplied. foo <- function(formula,data,subset=NULL) { cat("\n*Does formula[-3] == ~y ? TRUE **

Re: [Rd] model.frame() call from inside a function (PR#3671)

2003-08-12 Thread Saikat DebRoy
On Thursday, Aug 7, 2003, at 04:13 US/Eastern, Peter Dalgaard BSA wrote: [[ I did discover yesterday (or maybe I was just reminded...) that we even have nonstandard nonstandard evaluation rules in some places (nls() seems to evaluate its model formula in the global environment even if it is given

Re: [Rd] model.frame() call from inside a function (PR#3671)

2003-08-09 Thread Jerome Asselin
Thanks for your reply and discussion on the issue. See below for another suggestion of a fix. I have spent some time trying to find a fix which would still work as documented: > Variables in the formula, `subset' and in `...' are looked for > first in `data' and then in the environmen

Re: [Rd] model.frame() call from inside a function (PR#3671)

2003-08-07 Thread Thomas Lumley
On 7 Aug 2003, Peter Dalgaard BSA wrote: > [[ I did discover yesterday (or maybe I was just reminded...) that we > even have nonstandard nonstandard evaluation rules in some places > (nls() seems to evaluate its model formula in the global environment > even if it is given explicitly within a funct

Re: [Rd] model.frame() call from inside a function (PR#3671)

2003-08-07 Thread Saikat DebRoy
On Thursday, Aug 7, 2003, at 10:14 US/Eastern, Thomas Lumley wrote: On 7 Aug 2003, Peter Dalgaard BSA wrote: [[ I did discover yesterday (or maybe I was just reminded...) that we even have nonstandard nonstandard evaluation rules in some places (nls() seems to evaluate its model formula in the glo