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

2006-06-25 Thread Brian Davenhall
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

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

2006-06-25 Thread Gabor Grothendieck
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 [EMAIL PROTECTED] wrote: I'm getting the following error when trying to execute a glm() procedure: Error in model.frame(formula, rownames,

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

2006-06-25 Thread Prof Brian Ripley
What are the names of 'data?' It looks like you intended the response to be data$Response and not the object response found in your workspace. If so, you need to capitalize your formula. (And what version of R is this? -- R-devel actually tells you the type in this error message, so we know it

[R] Error in model.frame

2003-12-10 Thread Göran Broström
I recently ran into the following: x - c(1,2,4,3) lm(x ~ 1:length(x)) Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ but lm(x ~ c(1:length(x))) Call: lm(formula = x ~ c(1:length(x))) Coefficients: (Intercept)

Re: [R] Error in model.frame

2003-12-10 Thread Martyn Plummer
On Wed, 2003-12-10 at 10:34, Göran Broström wrote: I recently ran into the following: x - c(1,2,4,3) lm(x ~ 1:length(x)) Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ but lm(x ~ c(1:length(x))) Call:

Re: [R] Error in model.frame

2003-12-10 Thread Uwe Ligges
Göran Broström wrote: I recently ran into the following: x - c(1,2,4,3) lm(x ~ 1:length(x)) Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ but lm(x ~ c(1:length(x))) Call: lm(formula = x ~ c(1:length(x))) Coefficients:

Re: [R] Error in model.frame

2003-12-10 Thread Göran Broström
On 0, Uwe Ligges [EMAIL PROTECTED] wrote: Göran Broström wrote: I recently ran into the following: x - c(1,2,4,3) lm(x ~ 1:length(x)) Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ but lm(x ~ c(1:length(x)))

[R] Error in model.frame

2003-08-15 Thread Ross Boylan
I am getting an error that I don't understand, and wonder if anyone could explain what's going on. I call a function defined thus: clogit.rds-function(formula,data,extra.data,response.prob, na.action=getOption(na.action),subset=NULL, control=coxph.control()){

Re: [R] Error in model.frame

2003-08-15 Thread Thomas Lumley
be a problem. Well, it is a problem. model.frame() requires all the variables to be the same length, as you can readily see for yourself R x-1:10 R y-1 R model.frame(y~x) Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ That's why