#' Function trim
#'
#' Trims elements of a character vector.
#' @param x A character vector.
#' @details Trims elements of a character vector.
#' @keywords preprocessing
#' @export
#' @examples
#' trim(" Hi ")
trim <- function (x)
gsub("(^[ \n\r\t]+|[ \n\r\t]+$)", "", x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.