The sys.call or match.call functions may be what you are looking for:
> tmpfun <- function(x,y,z,...) {
+ as.list( sys.call() )
+ }
>
> tmpfun( x=5, w=3, 1:10 )
[[1]]
tmpfun
$x
[1] 5
$w
[1] 3
[[4]]
1:10
> tmpfun2 <- function(x,y,z,...) {
+ as.list( match.call() )
+ }
> tmpfun2( x=5, w=3, 1:10
On 01/09/2011 11:14 AM, Jannis wrote:
Dear list,
I am wondering whether there is an (easy) way to access all arguments and their
values passed to a function inside this function and (for example) store them
in a list object?
I could imagine using ls() inside this function and then looping th
2 matches
Mail list logo