#' Remove Escaped Characters
#'
#' Preprocess data to remove escaped characters
#'
#' @param text.var The text variable
#' @return Returns a vector of character strings with escaped characters removed.
#' @keywords escaped character
#' @export
#' @examples
#' x <- "I go \r
#' to the \tnext line"
#' x
#' clean(x)
clean <-
function(text.var) {
gsub("\\s+", " ", gsub("\r|\n|\t", " ", text.var))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.