R/convert.method.R

convert.method <- function(method){
  
  if(length(method) > 1){
    msg <- 'Invalid options$method'
    stop(msg)
  }
  
  if(is.numeric(method)){
    return(method)
  }
  
  valid.method <- c('ADAJOINT', 'ADAJOINT2', 'ARTP')
  method <- toupper(method)
  if(!(method %in% valid.method)){
    msg <- 'Invalid options$method'
    stop(msg)
  }
  
  method <- which(valid.method == method)
  method
  
}

Try the ARTP2 package in your browser

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

ARTP2 documentation built on May 2, 2019, 3:38 p.m.