distroptions {distr} | R Documentation |
With distroptions
you may inspect and change the global variables used by the package `distr'
distroptions(arg = "missing", value = -1)
arg |
the global variable to be shown or changed |
value |
the new value of the global variable |
distroptions()
returns a list of the global variables.
distroptions(arg=x)
returns the global variable x.
distroptions(arg=x,value=y)
sets the value of the global variable x to y.
Thomas Stabla Thomas.Stabla@uni-bayreuth.de,
Florian Camphausen Florian.Camphausen@uni-bayreuth.de,
Peter Ruckdeschel Peter.Ruckdeschel@uni-bayreuth.de,
Matthias Kohl Matthias.Kohl@uni-bayreuth.de
distroptions("RtoDPQ.e") # returns the value of RtoDPQ.e, by default = 5 distroptions("RtoDPQ.e",6) # now RtoDPQ.e = 6 ## The function is currently defined as function (arg = "missing", value = -1) { globals <- list(DefaultNrFFTGridPointsExponent = DefaultNrFFTGridPointsExponent, DefaultNrGridPoints = DefaultNrGridPoints, DistrResolution = DistrResolution, RtoDPQ.e = RtoDPQ.e, TruncQuantile = TruncQuantile) if (arg == "missing") { print(globals) return(invisible()) } if (!any(arg == names(globals))) stop(paste("No such variable:", arg)) if (value == -1) switch(arg, DefaultNrGridPoints = DefaultNrGridPoints, DistrResolution = DistrResolution, TruncQuantile = TruncQuantile, DefaultNrFFTGridPointsExponent = DefaultNrFFTGridPointsExponent, RtoDPQ.e = RtoDPQ.e) else eval.parent(parse(text = paste("assignInNamespace(\"", arg, "\",", value, ", \"distr\")", sep = ""))) }