Re: [R] print (names and) values of parameters of function

2016-10-09 Thread William Dunlap via R-help
There is no perfect way to do this because you can write functions that depend on the order of evaluation of their arguments or that must evaluate some code in the body of the function before evaluating an argument (e.g., stats:::print.formula) or that don't evaluate them in the usual sense. Howev

Re: [R] print (names and) values of parameters of function

2016-10-08 Thread David Winsemius
> On Oct 8, 2016, at 7:21 AM, Christian Hoffmann > wrote: > > I try to print (names and) values of parameters of a function within that > function, like: > > F <- function(x, y, z=4, ...) { > > print("x = ", x, " , y = ", y, "... = " , ...) > > in a fashion that avoids the explicit mentio

[R] print (names and) values of parameters of function

2016-10-08 Thread Christian Hoffmann
I try to print (names and) values of parameters of a function within that function, like: F <- function(x, y, z=4, ...) { print("x = ", x, " , y = ", y, "... = " , ...) in a fashion that avoids the explicit mention of "x = ", x, " , y = ", y, "... = " , ... Combinations of eval, substitu