Gradient Descent in R with multiple features