gl.check.verbosity: Returns the verbosity level a function should use

View source: R/gl.check.verbosity.r

gl.check.verbosityR Documentation

Returns the verbosity level a function should use

Description

Resolves the verbosity level for a dartR function. Most dartR functions call it first, as verbose <- gl.check.verbosity(verbose).

Usage

gl.check.verbosity(x = NULL)

Arguments

x

User requested level of verbosity, a single number from 0 to 5, or NULL to use the global default [default NULL].

Details

The verbosity comes from one of three sources, in this order of precedence:

  1. the value passed by the user in the function's verbose argument;

  2. the global default set with gl.set.verbosity, stored as the R option dartR_verbose;

  3. the value 2, when neither of the above is set.

A valid value is a single number from 0 to 5. Any other value (out of range, non-numeric, NA, or a vector of length other than one), whether passed as x or found in the global option, prints a warning and is replaced by 2.

Value

The verbosity level to use, a single number from 0 to 5.

Author(s)

Author(s): Bernd Gruber. Custodian: Bernd Gruber (Post to https://groups.google.com/d/forum/dartr)

See Also

Other environment: gl.check.wd(), gl.print.history(), gl.recalc.metrics(), gl.set.verbosity(), gl.set.wd(), theme_dartR()

Examples

gl.check.verbosity()
gl.check.verbosity(3)


dartR.base documentation built on Nov. 18, 2026, 9:06 a.m.