#' wordcount
#'
#' Count the number of distinct words in a sentence.
#'
#' @param x String variable or vector.
#'
#' @return Wordcount variable or vector.
#' @export
#'
#' @examples
#' \dontrun{
#' }
#'
wordcount <- function(x) {
stringr::str_count(x,
'[A-z]\\W+') + 1L
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.