#' Convert empty string and "NA" to NA
#'
#' @param .x Character vector.
#'
#' @return Vector of same length as `.x`.
#' @export
#'
#' @examples
#' empty_string_to_na(c("a", "", "NA", "b"))
empty_string_to_na <- function(.x) {
.x[.x == ""] <- NA_character_
.x[.x == "NA"] <- NA_character_
.x
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.