I have two data frames, "train" and "response". Here is my attempt to do a
linear regression. All entries of both data frames are numeric. I am
expecting the intercept value to lie between 2 and 3 (in particular,
non-zero).

Here is a record of my interaction with R:

> class(response)
[1] "data.frame"
> c(nrow(response),ncol(response))
[1] 1389    1
> class(train)
[1] "data.frame"
> c(nrow(train),ncol(train))
[1] 1389  256
> beta.lm <- lm(response ~ train)
Error in model.frame.default(formula = response ~ train, drop.unused.levels
= TRUE) :
  invalid type (list) for variable 'response'

What elementary syntax error am I making in my call to lm? And why does R
think at first that the class of "response" is data.frame, but that its
class is "list" when I call lm?

Thanks
David

	[[alternative HTML version deleted]]

