> From: David Winsemius [mailto:dwinsem...@comcast.net]
> Sent: Friday, October 22, 2010 9:43 PM
> To: William Dunlap
> Cc: Dimitri Liakhovitski; r-help
> Subject: Re: [R] lm looking for weights outside of the
> user-defined function
>
>
> On Oct 22, 2010, at 12:
weights outside of the
user-defined function
On Oct 22, 2010, at 9:18 AM, Dimitri Liakhovitski wrote:
David,
I undersand - and I am sure what you are suggesting should
work. But I
just can't understand why it's not grabbing things INSIDE the
environment of the formula first.
I am not
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius
> Sent: Friday, October 22, 2010 6:25 AM
> To: Dimitri Liakhovitski
> Cc: r-help
> Subject: Re: [R] lm looking for weights outside of the
&g
As you suggested, David, the code below works.
Now I it can find the weights - because they are in the data frame x.
But how can I be sure now that it actually grabs the data from the
data frame "variables" and not the data frame x?
x<-data.frame(y=rnorm(100,0,1),a=rnorm(100,1,1),b=rnorm(100,2,1),
On Oct 22, 2010, at 9:18 AM, Dimitri Liakhovitski wrote:
David,
I undersand - and I am sure what you are suggesting should work. But I
just can't understand why it's not grabbing things INSIDE the
environment of the formula first.
I am not sure that either one of us understand what is meant b
David,
I undersand - and I am sure what you are suggesting should work. But I
just can't understand why it's not grabbing things INSIDE the
environment of the formula first.
I've already tried to define the weights outside of the function - and
it finds them.
But shouldn't it go in this order?
1.
On Oct 22, 2010, at 9:01 AM, Dimitri Liakhovitski wrote:
Dear R'ers,
I am fighting with a problem that is driving me crazy. I use "lm" in
my user-defined function, but it seems to be looking for weights
outside of my function's environment:
### Generating example data:
x<-data.frame(y=rnorm(1
Dear R'ers,
I am fighting with a problem that is driving me crazy. I use "lm" in
my user-defined function, but it seems to be looking for weights
outside of my function's environment:
### Generating example data:
x<-data.frame(y=rnorm(100,0,1),a=rnorm(100,1,1),b=rnorm(100,2,1))
myweights<-runif(1
8 matches
Mail list logo