R/uniqueNonNA.R

Defines functions uniqueNonNA

Documented in uniqueNonNA

#' Make a vector free of NA and unique
#' 
#' 
#' @param x A vector
#' @return A unique vector without NA
#' @examples
#' 
#' testVec <- c(3,4,5,NA,3,5)
#' uniqueNonNA(testVec)
#' 
#' @export uniqueNonNA
uniqueNonNA <- function(x) {
  x <- x[!is.na(x)]
  res <- unique(x)
  return(res)
}

Try the ribiosUtils package in your browser

Any scripts or data that you put into this service are public.

ribiosUtils documentation built on March 13, 2020, 2:54 a.m.