khisr-configuration {khisr}R Documentation

khisr Configuration

Description

Some aspects of khisr behaviour can be controlled via an option.

Usage

with_khis_quiet(code)

local_khis_quiet(env = parent.frame())

Arguments

code

Code to execute quietly

env

The environment to use for scoping

Value

No return value, called for side effects

No return value, called for side effects

No return value, called for side effects

Messages

The khis_quiet option can be used to suppress messages form khisr. By default, khisr always messages, i.e. it is not quiet.

set khis_quiet to TRUE to suppress message, by one of these means, in order of decreasing scope:

local_khis_quiet and with_khis follow the conventions of the withr package.

Examples


## Not run: 
    # message: "The credentials have been set."
    khis_cred(username = 'username',
              password = 'password',
              base_url = 'https://dhis2-instance/api')

    # suppress messages for a small amount of code
    with_khis_quiet(
        khis_cred(username = 'username',
                  password = 'password',
                  base_url = 'https://dhis2-instance/api')
    )

## End(Not run)

## Not run: 
    # message: "The credentials have been set."
    khis_cred(username = 'username',
              password = 'password',
              base_url = 'https://dhis2-instance/api')

    # suppress messages for a in a specific scope
    local_khis_quiet()

    # no message
    khis_cred(username = 'username',
              password = 'password',
              base_url = 'https://dhis2-instance/api')

    # clear credentials
    khis_cred_clear()

## End(Not run)

[Package khisr version 1.0.5 Index]