R/find.balance.method.R

Defines functions find.balance.method

find.balance.method <- function(method,
                                ...)
{

  if (is.character(method)){

    if (!method == "classical" &
        !method == "stand.diff"){

      stop("Argument 'method' is no valid.")

    }else{
  
      if (method == "classical")
        bal <- balance.classical(...)

      if (method == "stand.diff")
        bal <- balance.stand.diff(...)

    }
  }else{
    stop("Argument 'method' must be a string.")
  }

  return(bal)
  
}

Try the nonrandom package in your browser

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

nonrandom documentation built on May 29, 2017, 11:41 p.m.