Learn R Programming

NMF (version 0.2.2)

options-NMF: NMF Package Specific Options

Description

NMF Package Specific Options

nmf.options sets/get single or multiple options, that are specific to the NMF package. It behaves in the same way as options.

nmf.getOption returns the value of a single option, that is specific to the NMF package. It behaves in the same way as getOption.

nmf.resetOptions reset all NMF specific options to their default values.

nmf.printOptions prints all NMF specific options along with their default values, in a relatively compact way.

Usage

nmf.options(...)

nmf.getOption(x, default = NULL)

nmf.resetOptions(..., ALL = FALSE)

nmf.printOptions()

Arguments

...
option specifications. For nmf.options this can be named arguments or a single unnamed argument that is a named list (see options.

For nmf.resetOptions, this must be the nam

ALL
logical that indicates if options that are not part of the default set of options should be removed. Note that in pkgmaker <= 0.9<="" pkg=""> this argument is only taken into account when no other argument is present. This is fixed in version 0.9.1
x
a character string holding an option name.
default
if the specified option is not set in the options list, this value is returned. This facilitates retrieving an option and checking whether it is set and setting it separately if not.

Examples

Run this code
# roxygen generated flag
options(R_CHECK_RUNNING_EXAMPLES_=TRUE)

# show all NMF specific options
nmf.printOptions()

# get some options
nmf.getOption('verbose')
nmf.getOption('pbackend')
# set new values
nmf.options(verbose=TRUE)
nmf.options(pbackend='mc', default.algorithm='lee')
nmf.printOptions()

# reset to default
nmf.resetOptions()
nmf.printOptions()

Run the code above in your browser using DataLab