#' This function checks if a variable is equivalent to character(0) and handles the data accordingly.
#' @param item the item to be checked
#' @return NA if the item is equivalent to character(0), the item otherwise
#' @export
checkNull <- function(item) {
if(!identical(item, character(0))) {
return(item)
}
return(c(NA))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.