Updated R functions for GLM, K-means, and RF.