R/glpenalty.R

Defines functions glpenalty

Documented in glpenalty

glpenalty <-
function(X,x0 = NA,x1 = NA,p=NA,b=NA,type = NA,plotpenalty = TRUE,allowed.error = 0.005,invert = FALSE) {
  if (min(is.na(x0)) == FALSE & min(is.na(x1) == FALSE)) {
    glpenalty = vglpenalty(X,x0,x1,plotpenalty,allowed.error,invert)
  } else if (min(is.na(x1)) == FALSE & is.na(b) == FALSE & is.na(type) == FALSE) {
    glpenalty = bglpenalty(X,x1,b,type,plotpenalty,allowed.error,invert)
  } else if (is.na(p) == FALSE & is.na(b) == FALSE & is.na(type) == FALSE) {
    glpenalty = pglpenalty(X,p,b,type,plotpenalty,allowed.error,invert)
  } else {
    stop("arguments supplied did not match requirements")
  }
  glpenalty
}

Try the phalen package in your browser

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

phalen documentation built on May 29, 2017, 4:22 p.m.