distroptions              package:distr              R Documentation

_f_u_n_c_t_i_o_n _t_o _c_h_a_n_g_e _t_h_e _g_l_o_b_a_l _v_a_r_i_a_b_l_e_s _o_f _t_h_e _p_a_c_k_a_g_e '_d_i_s_t_r'

_D_e_s_c_r_i_p_t_i_o_n:

     With 'distroptions' you may inspect and change the global
     variables used by the package '`distr''

_U_s_a_g_e:

     distroptions(arg = "missing", value = -1)

_A_r_g_u_m_e_n_t_s:

     arg: the global variable to be shown or changed 

   value: the new value of the global variable 

_V_a_l_u_e:

     '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.

_A_u_t_h_o_r(_s):

     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

_E_x_a_m_p_l_e_s:

     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 = "")))
       }

