Skip to content

Instantly share code, notes, and snippets.

@dsilvadeepal
Created August 14, 2018 20:19
Show Gist options
  • Save dsilvadeepal/e1a4614ff39f41f822c3a9bbee4ca25d to your computer and use it in GitHub Desktop.
Save dsilvadeepal/e1a4614ff39f41f822c3a9bbee4ca25d to your computer and use it in GitHub Desktop.
convert_values <- function(x) {
x <- ifelse(x > 0, "Yes", "No")
}
sms_train <- apply(sms_dtm_freq_train, MARGIN = 2,
convert_values)
sms_test <- apply(sms_dtm_freq_test, MARGIN = 2,
convert_values)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment