gsifiltercall          package:compositions          R Documentation

_C_a_l_l_i_n_g _f_r_o_m _a _f_u_n_c_t_i_o_n _w_i_t_h _t_h_e _o_w_n _p_a_r_a_m_e_t_e_r_s

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

     gsi.filtercall gives those arguments of the arguments of the
     calling function to called function that are made for this
     function. It is possible to modify the parameters on the flight.

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

     gsi.filtercall(fkt,...,overwrite=NULL,
                    transmit=character(0),default=list(...),
                    prefix=if(is.character(fkt)) fkt else NULL)

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

     fkt: a function or a name of a function to be called

     ...: default arguments, which are used if not overwritten by own
          arguments

overwrite: a named list overwriting arguments provided in any other way

transmit: a character vector containing all named arguments that should
          be given to 'fkt', although they are not formal parameters of
          'fkt'

 default: the list of default parameters to be used if not otherwise
          specified

  prefix: the user can specify arguments for 'fkt' explicitly by
          prefixing them with 'prefix'.. Typically the prefix is the
          name of the function

_D_e_t_a_i_l_s:

     gsi.filtercall is a kind of R technology help. It allows to pass
     parameters in a ...{} fashion with less effort, more robustness
     and more control, since one does not need to copy all
     explicitly-given parameters. It simply manages the
     ...{}-parameters accepted by 'fkt', allowing for giving default
     values, or overwriting specific parameters without need to mention
     them in the formal arguments. This also helps to clarify the
     documentation of 'fkt'.

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

     The value of a call to 'fkt' with those parameters modified by 
     'gsi.filtercall' itself

_N_o_t_e:

     Do not use gsi.* functions directly since they are internal
     functions of the package. However I would like to propose a
     function like this to become standard technology

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

     K.Gerald v.d. Boogaart <URL: http://www.stat.boogaart.de>

_S_e_e _A_l_s_o:

     'gsi'

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

             fxy <- function(x,y) x+y
             fxz <- function(x,z) x*z
             fxyz <- function(...) {
                list(gsi.filtercall("fxy"),gsi.filtercall("fxz"))
             }        
             fxyz(x=1,y=2,z=7)
             fxyz(x=1,fxz.x=2,y=10,z=55)

