R programming lapply and sapply ; coursera intro to machine learning started