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.
nmf.options(...)
nmf.getOption(x, default = NULL)
nmf.resetOptions(..., ALL = FALSE)
nmf.printOptions()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 names of
the options to reset. Note that pkgmaker version >=
0.9.1 is required for this to work correctly, when
options other than the default ones have been set after
the package is loaded.
'cores'
is not set. Moreover, the number of cores can also be set
at runtime, in the call to nmf, via
arguments .pbackend or .options (see
nmf for more details).nmf function when argument method is
missing. The value should the key of one of the
registered NMF algorithms or a valid specification of an
NMF algorithm. See ?nmfAlgorithm.nmf function when argument seed is missing.
The value should the key of one of the registered seeding
methods or a vallid specification of a seeding method.
See ?nmfSeed.TRUE, the nmf function compute and store
the residual track in the result -- if not otherwise
specified in argument .options. Note that tracking
may significantly slow down the computations.?nmf.track for backward compatibility.nmf function when argument
.pbackend is missing. Currently the following
values are supported: 'par' for multicore,
'seq' for sequential, NA for standard
sapply (i.e. do not use a foreach loop),
NULL for using the currently registered foreach
backend.pbackend for backward compatibility.
# 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