gsifiltercall | R Documentation |
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.
gsi.filtercall(fkt,...,overwrite=NULL,
transmit=character(0),default=list(...),
prefix=if(is.character(fkt)) fkt else NULL)
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 |
default |
the list of default parameters to be used if not otherwise specified |
prefix |
the user can specify arguments for |
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
.
The value of a call to fkt
with those parameters modified by
gsi.filtercall
itself
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
K.Gerald v.d. Boogaart http://www.stat.boogaart.de
gsi
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.