#' predictEmail
#'
#' Predict whether an email is spam or not
#' @param email The email to be checked
#' @return Character "spam" if it is suspected to be spam, otherwise "ham"
#' @examples
#' predictEmail("This is my email")
#' @export
#'
predictEmail <- function(email) {
attr <- textToAttribute(email)
pred <- predict(svmModel,attr[,1:57])
return(levels(pred)[pred])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.