R/isEmpty_function.R

Defines functions isEmpty

Documented in isEmpty

#' @title isEmpty
#' @description This function check whether data is numeric(0) and give returns an NA if this is true and the value of the data otherwise.
#' @param x Data
#' @export
#' @return NA or the data

isEmpty<-function(x){
  if(length(x)==0) {
    return(NA)
  } else {
    return(x)
  }
}
MatthewSmith430/ITNr documentation built on April 15, 2024, 8:05 a.m.