R/ArgtoInt.R

Defines functions .ArgtoInt

.ArgtoInt <- function(x) {
  if (is.character(x) & length(x) == 1) {
    if (all(x == "Matern") || all(x == "Posterior") ||
      all(x == "CV") || all(x == "CrossValidate")) {
      return(1)
    }
    if (all(x == "PowerExponential") || all(x == "Likelihood") ||
      all(x == "Objective") || all(x == "Predict")) {
      return(0)
    }
  }
}

Try the GaSP package in your browser

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

GaSP documentation built on May 31, 2023, 7:54 p.m.