#' find_whitespace w/ double-colon approach
#'
#' Is there whitespace in the string?
#'
#' @param str string
#'
#' @return boolean
#' @export
find_whitespace <- function(str) {
stringr::str_detect(str, "\\s") # in console: use_package("stringr")
}
#' find_whitespace w/ @@importFrom approach
#'
#' Is there whitespace in the string?
#'
#' @param str string
#'
#' @return boolean
#' @export
#' @importFrom stringr str_detect
find_whitespace_2 <- function(str) {
str_detect(str, "\\s")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.