R/empty2na_function.R

Defines functions empty2na

Documented in empty2na

#' @title empty2na
#'
#' @description Check is an object is empty and return "NA if it is.
#' @param x data
#' @export
#' @return NA if empty, data otherwise
#'
empty2na<-function(x){
  CHECKres<-rapportools::is.empty(x)
  if (CHECKres==TRUE){
    d<-"NA"
  }else{d<-x}
  return(d)
}
MatthewSmith430/CompaniesHouse documentation built on Jan. 28, 2024, 3:08 a.m.