nhanesOptions: Options for the nhanesA package

View source: R/nhanes_options.R

nhanesOptionsR Documentation

Options for the nhanesA package

Description

Set and retrieve global options controlling the behaviour of certain functions in the package.

Usage

nhanesOptions(...)

Arguments

...

either one or more named arguments giving options to be set (in the form key = value), or a single unnamed character string to retrieve a setting.

Details

The 'nhanesOptions()' function can be used in two forms, to set or get options. Options can be set using 'nhanesOptions(key1 = value1, key2 = value2)'. Options can be retrieved (one at a time) using 'nhanesOptions("key")'. When called with no arguments, all currently set options are returned as a list.

Options currently used in the package are 'use.db' (logical flag controlling whether a database should be used if available), and 'log.access', a logical flag that logs any attempted URL access by printing the URL).

Value

When retrieving an option, the value of the option, or NULL if the option has not been set. When setting one or more options, a list (invisibly) containing the previous values (possibly NULL) of the options being set.

Author(s)

Deepayan Sarkar <deepayan.sarkar@gmail.com>

Examples

 nhanesOptions(foo = "bar")
 nhanesOptions()
 print(nhanesOptions(foo = NULL))

cjendres1/nhanes documentation built on April 23, 2024, 10:55 a.m.