Building a prediction model with R to determine whether an email is spam or non-spam.