So in both my solution and your second option, lm prints that it evaluated the
regression in a function context (using dfr) which the user of the function
might prefer to be unaware of (they know what X.des is). Your first solution
avoids that but hardcodes access to the global variable so if t
> In a nutshell, formulas carry the environment in which they are defined along
> with the variable names, and your dfr was defined in the test.FN environment,
> but the formulas were defined in the global environment. I got this to work by
> defining the formula character strings in the global env
In a nutshell, formulas carry the environment in which they are
defined along with the variable names, and your dfr was defined in the
test.FN environment, but the formulas were defined in the global
environment. I got this to work by defining the formula character strings
in the global environ
Hi,
I've run into a problem calling the step function from within a function; I
sent this to the R development list first, but the moderator said it was better
suited to R help. My OS is Windows 7 and I'm using R version 3.2.3.
Here's a simple function to help reproduce the error:
> test.
4 matches
Mail list logo