[R] Error in model.frame: invalid variable type

Gabor Grothendieck ggrothendieck at gmail.com
Sun Jun 25 20:37:36 CEST 2006


The names of your variables are Response and Seed, not response
and seed.  The latter two are the names of your data frames.

On 6/25/06, Brian Davenhall <bdavenhall at sbcglobal.net> wrote:
> I'm getting the following error when trying to execute a glm() procedure:
>
>
>
> Error in model.frame(formula, rownames, variables, varnames, extras,
> extranames,  :
>        invalid variable type for 'response'
>
>
>
> The commands I'm using to import the *.csv files, construct the data frame,
> and run the glm procedure are below:
>
>
>
> response <- read.csv("Response.csv", header = TRUE, sep = ",")
>
> seed <- read.csv("Seed.csv", header = TRUE, sep = ",")
>
> data <- data.frame(seed, response)
>
> model <- glm(response~seed, family=binomial(link=logit), data=data)
>
>
>
> My Response.csv files look like this:
>
>
>
> Response
>
> 0
>
> 0
>
> 1
>
> ...
>
>
>
> My Seed.csv files look like this:
>
>
>
> Seed
>
> 0.25
>
> 0.65
>
> 0.47
>
> ....
>
>
>
> Thanks in advance for any help,
>
> Brian
>
>
>
>
>
>
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



More information about the R-help mailing list