| options {spam} | R Documentation |
Allow the user to set and examine a variety of options which affect the way in which R computes and displays sparse matrix results.
spam.options(...) spam.getOption(x)
... |
any options can be defined, using name = value or
by passing a list of such tagged values. However, only the ones
below are used in spam.
Further, spam.options('name') == spam.options()['name'], see the example.
|
x |
a character string holding an option name. |
Invoking spam.options() with no arguments returns a list with the
current values of the options. To access the value of a single option, one should
use spam.getOption("eps"), e.g., rather than
spam.options("eps") which is a list of length one.
Internally, the options are kept in the list .Spam.
For spam.getOption, the current value set for option x, or
NULL if the option is unset.
For spam.options(), a list of all set options sorted by category. For
spam.options(name), a list of length one containing the set value,
or NULL if it is unset. For uses setting one or more options,
a list with the previous values of the options changed (returned
invisibly).
A short description with the default values follows.
eps=.Machine$double.eps:drop=FALSE:drop when subsettingprintsize=100:imagesize=10000:image or display. Larger matrices are represented
as dots only.trivalues=FALSE:FALSE) or the values themselves (TRUE) when returning the
upper and lower triangular part of a matrix.cex=1200:image or display.dopivoting=TRUE:FALSE
would solve the system without using the permutation.safemode=c(TRUE,TRUE,TRUE):spam objects (2) quick sanity check when constructing sparse
matrices (3) testing for NAs in Fortan calls.
TRUEs are safer but slightly slower. The most relevant speedup
is the second flag.cholsymmetrycheck=TRUE:cholpivotcheck=TRUE:cholupdatesingular="warning":"warning" only and
returning the not updated factor, "error" or return simply "NULL".cholincreasefactor=c(1.25,1.25):nnznearestdistnnz=c(400^2,400):nearest.dist.nearestdistincreasefactor=1.25:
spam.options is essentially identical to sm.options.
print,
display, image, upper.tri,
chol, nearest.dist, etc.
op <- spam.options() # two ways of representing the options nicely. utils::str(op) noquote(unlist(format(op)) ) smat <- diag.spam( 1:8) smat spam.options( printsize=49) smat # Reset to default values: spam.options( eps=.Machine$double.eps, drop=FALSE, printsize=100, imagesize=10000, cex=1200, trivalues=FALSE, safemode=c(TRUE,TRUE,TRUE), dopivoting=TRUE, cholsymmetrycheck=TRUE, cholpivotcheck=TRUE, cholupdatesingular="warning", cholincreasefactor=c(1.25,1.25), nearestdistincreasefactor=1.25, nearestdistnnz=c(400^2,400) )