Skip to content

Instantly share code, notes, and snippets.

@dsilvadeepal
Created August 14, 2018 19:30
Show Gist options
  • Save dsilvadeepal/fc0dd97401942aed7e78a5b6813ce4af to your computer and use it in GitHub Desktop.
Save dsilvadeepal/fc0dd97401942aed7e78a5b6813ce4af to your computer and use it in GitHub Desktop.
#View the first few lines of the dataset
head(sms_raw)
#Select & rename appropriate columns of the dataset
sms_raw <- sms_raw[, 1:2]
colnames(sms_raw) <- c("Tag", "Msg")
str(sms_raw)
#Find the proportions of junk vs legitimate sms messages
table(sms_raw$Tag)
prop.table(table(sms_raw$Tag))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment