Re: [R] List arguments from data frame columns in formula

2010-01-12 Thread npobedina
Thanks a lot for help! :) I've invented a more complicated way to make it work: f <- as.formula(paste("data.y~", paste( names(data.x), collapse = "+"))) fml<-glm(f, data=data.x,family=binomial) Try this: glm(y ~ ., family = binomial, data = data, ...) -- View this message in context: http:

Re: [R] List arguments from data frame columns in formula

2010-01-12 Thread Gabor Grothendieck
Try this: glm(y ~ ., family = binomial, data = data, ...) On Tue, Jan 12, 2010 at 9:45 AM, npobedina wrote: > > Hi! > I'm trying to run logistic regression on a dataset which is contained in > dataframe "data" ("y" is in the first col, and 28 parameters for the model). > How can I write formula

[R] List arguments from data frame columns in formula

2010-01-12 Thread npobedina
Hi! I'm trying to run logistic regression on a dataset which is contained in dataframe "data" ("y" is in the first col, and 28 parameters for the model). How can I write formula for function `glm` without listing explicitly all 28 paramaters? `glm(data[,1]~data[,2]+data[,3]+data[,4]+...,family=bin