This is an R problem, not a statistics problem.
I am trying to perform multiple linear regression in R for a set of 20 independent variables and 1 dependent variable. The 20 independent variables are in one csv file and the 1 dependent variable is in another csv file. Each row in each file corresponds to one measurement a day.
I have managed to import the 20 independent variables using read.csv(...) into a (variable?) called "predictors". I then imported the dependent measurements, again using read.csv(...), into a (variable?) called "dependent".
However when I use lm(dependent~X1+X2+X3+X4+X5+X6+X7+X8+X9+X10+X11+X12+X13+X14+X15+X16+X17+X18+X19+X20)
(Note: X_1,...,X20 are the headers of the columns for the predictors in that csv file)
I get the error:
Error in model.frame.default(formula = dependent ~ X1 + X2 + X3 + X4 + X5 + : invalid type (list) for variable 'dependent'
I cannot understand what is going wrong?
The predictors file looks something like (but up to X20)
and the dependent csv file looks like


cbindto append 2 dataframes - etiennestr()). - Roman Luštrikdput(head(dependent,20))- etienne