R/get_optional_argument.R

Defines functions get_optional_argument

get_optional_argument <- function(optional_args, argname, val_if_null) {
    rawval <- optional_args[[argname]]

    if (is.null(rawval)) {
        val_if_null
    } else {
        rawval
    }
}

Try the PhotoGEA package in your browser

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

PhotoGEA documentation built on April 11, 2025, 5:48 p.m.