i have a dataset with 1 label attribute and 784 pixel attributes with 42000 rows like below
label pixel0 pixel1 pixel2 ........... pixel783
0 1 0 0 16
.
.
1 2 15 1 0
Now i want to perform regression on it and so i use lm
function
lm(label~pixel0+pixel1+pixel2..........+pixel784,data=df )
but to write pixel0 to pixel 784 is , according to me foolishness.
Is there a way to avoid manually writing the above exp or i have to do so?