Learn R Programming

distrEx (version 2.9.5)

internals_for_distrEx: Internal functions of package distrEx

Description

These functions are used internally by package distrEx.

Usage

.getIntbounds(object, low, upp, lowTQ, uppTQ, IQR.fac, ...)
.filterFunargs(dots, fun, neg = FALSE)
.filterEargs(dots, neg = FALSE)
.reorganizeDiagnosticList(liste, .depth=1, names0, prenames = "",
          nmstoGather="", nmstoGatherNS="",  withprint=TRUE,
          .GatherList = NULL, .GatherListNS = NULL)
.showallNamesDiagnosticList(liste, .depth=1)
.nmsToGather

Value

.getIntbounds

a named numeric vector with coordinates low and upp.

Arguments

object

an object of class "AbscontDistribution"

low

given lower integration bound

upp

given lower integration bound

lowTQ

lower quantile for quantile based integration range.

uppTQ

upper quantile for quantile based integration range.

IQR.fac

factor for scale based integration range (i.e.; median of the distribution \(\pm\)IQR.fac\(\times\)IQR).

dots

a list as obtained by list(...).

...

arguments passed through to other functions (in particular argument cond in .getIntbounds)

neg

logical: if FALSE (default) the items in dots with argument names coinciding with formal argument names used by distrExIntegrate, integrate, GLIntegrate, except for ..., f, distr, are returned; otherwise the logical complement, i.e., those items not coinciding with the mentioned names are returned.

fun

a function the formals of which are to be filtered from argument list dots.

liste

a list (usually of S3 class "DiagnosticClass") as filled from various functions with diagnostic information; it usually has a tree structure and is the to be reorganized; this is done in function .reorganizeDiagnosticList which groups items of the same name in several sublists.

.depth

an argument to be used internally to determine the depth of the recursion when moving through the tree.

names0

a character vector with the names of the items to be regrouped in new sublists.

prenames

to determine the position in the original tree, the names of parent nodes are concatenated, separated by "$" and passed on to children nodes by argument prenames.

nmstoGather

we have two kind of diagnostic list items, ones which are easily grouped (numeric, character, logical) and ones which are calls, lists or functions. nmstoGather takes the names of items to be regrouped which are of the first kind.

nmstoGatherNS

the names of items to be regrouped which are of the second kind (NS standing for "non-shown").

.GatherList

the list of new regrouped sublists (of first kind). This argument is not filled by the user but rather passed on within the recursion when moving through the tree.

.GatherListNS

the list of new regrouped sublists (of second kind). This argument is not filled by the user but rather passed on within the recursion when moving through the tree.

withprint

logical; should intermediate information when moving through the tree be printed?

Author

Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de,

Details

.getIntbounds integration bounds are obtained as lowB <- max(low, q.l(object)(lowTQ), median(object)-IQR.fac*IQR(object)) and uppB <- min(upp, q.l(object)(1-uppTQ), median(object)+IQR.fac*IQR(object))

.filterEargs filters out arguments that are used in numerical integration and returns only these (or returns all items except for them, if argument neg is TRUE).

.filterFunargs filters out arguments the names of which are within the names of the formal arguments of fun (or returns all items of dots except for the matched ones, if argument neg is TRUE).

.nmsToGather is a character vector containing the names of items which are easily regrouped (of first kind in the distinction in the arguments namestoGather and namestoGatherNS); the distinction in these two categories is based on this vector; those items not in this vector are put into the second kind.

.showallNamesDiagnosticList runs through all the nodes in the list and collects all names and then returns the list of all (unique) names found.

.reorganizeDiagnosticList reorganizes the nodes of the nodes in the list, regrouping them into groups with the names.

See Also

AbscontDistribution, distrExIntegrate