An implementation of logistic regression in R, with batch gradient descent algorithm