R/check_product.R

Defines functions check_input

Documented in check_input

# check_input is to check whether the input is within a normal range of correlation
#' check if input is valid
#'
#' check whether the user gives valid correlations
#'
#' @param a each element of the input/correlation
#'
#' @return True if the input is valid otherwise False
#' @export
check_input <- function(a){
  if ( a > 1 || a < -1 ) {
    return(FALSE)
  } else {
    return(TRUE)
  }
}
linqinyu/Test documentation built on May 16, 2019, 9:10 p.m.