I am reading a data set as follows:
data<-read.csv("test.csv",sep=",",header=T)
the first column of test.csv is the response variable. The remaining 20 columns are predictor variables. How can I write the lm formula for this kind of scenario. It kind of not a correct approach to write formula as
modelfit<-lm(data[,1]~data[,2]+data[,3],+... )