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

Christian Hoffmann christian at echoffmann.ch
Sat Oct 8 16:21:12 CEST 2016


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, substitute, formals, etc. should be able to do the 
job, but I didn't find help online.

Anyone lend a helping hand?
TIA  Christian

-- 
Christian W. Hoffmann
CH - 8915 Hausen am Albis, Schweiz
Rigiblickstrasse 15 b, Tel.+41-44-7640853
mailto: christian at echoffmann.ch
home: www.echoffmann.ch



More information about the R-help mailing list