File: control.R

package info (click to toggle)
rglpk 0.6-0-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 156 kB
  • ctags: 8
  • sloc: ansic: 283; sh: 52; makefile: 1
file content (19 lines) | stat: -rw-r--r-- 638 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.check_control_parameters <- function( control ){
    stopifnot(is.list(control))
    ## Default paramenters (currently only verbosity supported)
    out <- list(verbose = FALSE,
                canonicalize_status = TRUE)
    out[names(control)] <- control
    if (!is.null(out$verbose)) {
        out$verbose <- as.integer(out$verbose)
        if (!out$verbose %in% c(0L, 1L)) {
            warning("Improper value for 'verbose' parameter. Using default.")
            out$verbose <- 0L
        }
    }
    if (!is.null(out$canonicalize_status)) {
        out$canonicalize_status <- as.logical(out$canonicalize_status)
    }
    out
}