R/configs.R

Defines functions set_configs

Documented in set_configs

#' Set configuration settings.
#' 
#' @param name  Configuration variable name.
#' @param value Value to assign to the configuration variable.
#' @returns Assigned value.
#' @examples
#' set_configs("hessian_min", 1e-6)
#' set_configs("hessian_min")
#' @export
set_configs <- function(name, value=NULL)
{
    configs <- new(RConfigs)
    if (is.null(value)) {
        value <- configs[[paste(name, "_def", sep="")]]
    }
    configs[[name]] <- value
    value
}

Try the adelie package in your browser

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

adelie documentation built on Sept. 11, 2024, 6:36 p.m.