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

From: Brian Davenhall <bdavenhall_at_sbcglobal.net>
Date: Mon 26 Jun 2006 - 04:28:46 EST


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@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 Received on Mon Jun 26 04:34:18 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 26 Jun 2006 - 06:11:49 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.