Displaying 2 results from an estimated 2 matches for "lulala".
Did you mean:
lalala
2010 Jul 28
0
Fwd: How to point a column of dataframe by a "character"
(Forgot to copy the list.)
Begin forwarded message:
> From: David Winsemius <dwinsemius at comcast.net>
> Date: July 28, 2010 7:44:38 AM EDT
> To: Tony <lulala at gmail.com>
> Subject: Re: [R] How to point a column of dataframe by a "character"
>
>
> On Jul 28, 2010, at 5:35 AM, Tony wrote:
>
>> Hello,
>>
>> Here is a dilemma I am having for a long time. But, I couldn't
>> figure it
>> out.
&...
2010 Jul 28
1
How to point a column of dataframe by a "character"
Hello,
Here is a dilemma I am having for a long time. But, I couldn't figure it
out.
I have an vector of Y and a data frame named "data",which contains all Xs. I
tried to be more efficient in fitting a simple linear regression with each
X.
Firstly,
for (i in 1:(dim(data)[2])){
model<-lm(Y~data[,i])
# this is not what I want since the name of coefficient will be data[,i]
# I