| distroptions {distr} | R Documentation |
functions to change the global variables of the package ‘distr’
Description
With distroptions and getdistrOption you may inspect and change the global
variables used by package distr.
Usage
distroptions(...)
getdistrOption(x)
Arguments
... |
any options can be defined, using name = value or by passing a list of such tagged values. |
x |
a character string holding an option name. |
Details
Invoking distroptions() with no arguments returns a list with the current values of the options.
To access the value of a single option, one should use getdistrOption("WarningSim"), e.g., rather than
distroptions("WarningSim") which is a list of length one.
Value
distroptions() returns a list of the global options of distr.
distroptions("RtoDPQ.e") returns the global option RtoDPQ.e as a list of length 1.
distroptions("RtoDPQ.e" = 3) sets the value of the global option RtoDPQ.e to 3.
getdistrOption("RtoDPQ.e") the current value set for option RtoDPQ.e.
Currently available options
DefaultNrGridPointsdefault number of grid points in integration, default value:
2^12DistrResolutionminimal spacing between two mass points in a discrete distribution, default value:
1e-6DistrCollapselogical; in discrete distributions, shall support points with distance smaller than
DistrResolutionbe collapsed; default value:TRUETruncQuantileargument for
q-slot at which to truncate; also, for discrete distributions, support is restricted to [q(TruncQuantile),q(1-TruncQuantile)], default value:1e-5DefaultNrFFTGridPointsExponentby default, for e =
DefaultNrFFTGridPointsExponent, FFT uses2^egridpoints; default value:12RtoDPQ.eby default, for reconstructing the
d-,p-,q-slots out of simulations by slotr,RtoDPQresp.RtoDPQ.duse10^esimulations, where e =RtoDPQ.e, default value:5WarningSimif
WarningSim==TRUE,print/showissue a warning as to the precision ofd-,p-,q-slots when these are obtained byRtoDPQresp.RtoDPQ.d, default value:TRUEWarningArithif
WarningArith==TRUE,print/showissue a warning as to the interpretation of arithmetics operating on distributions, when the corresponding distribution to be plotted/shown is obtained by such an operation; keep in mind that arithmetics in fact operate on random variables distributed according to the given distributions and not on corresponding cdf's or densities; default value:TRUEwithSweaveis code run in Sweave (then no new graphic devices are opened), default value:
FALSEwithgapscontrols whether in the return value of arithmetic operations the slot
gapsof an theAbscontDistributionpart is filled automatically based on empirical evaluations viasetgaps—defaultTRUEsimplifyDcontrols whether in the return value of arithmetic operations there is a call to
simplifyDor not —defaultTRUE- use.generalized.inverse.by.default
logical; decides whether by default (i.e., if argument
generalizedofsolveis not explicitely set),solveis to use generalized inverses if the originalsolve-method from package base fails; if the option isFALSE, in case of failure, and unless argumentgeneralizedis not explicitely set toTRUE,solvewill throw an error as is the base-method behavior. The default value isTRUE.DistrCollapse.Unique.Warncontrols whether there is a warning whenever collapsing occurs or when two points are collapsed by a call to
unique()(default behaviour ifDistrCollapseisFALSE); —defaultFALSEwarn.makeDNewcontrols whether a warning is issued once in internal utility
.makeDNewstandard integration withintegratethrows an error—defaultTRUE
Author(s)
Thomas Stabla statho3@web.de,
Florian Camphausen fcampi@gmx.de,
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de,
Matthias Kohl Matthias.Kohl@stamats.de
See Also
Examples
distroptions("RtoDPQ.e") # returns the value of RtoDPQ.e, by default = 5
currentDistrOptions <- distroptions()
distroptions(RtoDPQ.e = 6)
distroptions("RtoDPQ.e")
getdistrOption("RtoDPQ.e")
distroptions(c("WarningSim","WarningArith"))
getdistrOption("WarningSim")
distroptions("WarningSim" = FALSE)
# switches off warnings as to (In)accuracy due to simulations
distroptions("WarningArith" = FALSE)
# switches off warnings as to arithmetics
distroptions(currentDistrOptions)