R/onceT1.R

Defines functions onceT1

Documented in onceT1

#' Title function to check if a vector has only 1 T1
#'
#' @param vec : input vector to be checked
#' @author Johnson Liu
#' @return true if vec has only 1 T1 and false otherwise
#' @export
#'
#' @examples
onceT1<-function(vec){
  assert_that(is.character(vec))
  assert_that(sum(!unique(vec)%in%c("N","T1","T2"))==0)
  if(sum(vec=="T1")==1){
    return(TRUE)
  }else{
    return(FALSE)
  }
}
AlineTalhouk/FluidigmValidation documentation built on May 5, 2019, 4:54 a.m.