Skip to content
Prev 278529 / 398503 Next

Error: invalid type(list) for variable when using lm()

Inline below. HOWEVER -- my comments are tentative and need
verification by someone more expert because:

1. This is not a reproducible example, so I have no idea what really happening

2. I don't know what your dbQuery command does.Do you?

But see below for my guesses

-- Bert

On Fri, Nov 25, 2011 at 10:10 AM, David Winsemius
<dwinsemius at comcast.net> wrote:
It should be str(mymatrix)
LHS is missing, but presumably just a typo here. Note that a and b
would contain only 3 values each, presumably not what you want. And,
as I said in my earlier message, you don't need to do this anyway.
I think the problem is the structure of rs. Is it a data.frame or a
list or what? What does str(rs) give you?

I think you need to **carefully** read ?dbGetQuery
-- I second this.