R double dot special identifiers -
can point doc double dot special identifiers? below context described. example how produce double dot:
l <- list() f <- function(x, y, z){ l <<- c(l, list(match.call())) x[y][z] } invisible(lapply(list(1:2,3:4), f, c(true,true), c(true,false))) l # [[1]] # fun(x = x[[i]], y = ..1, z = ..2) # # [[2]] # fun(x = x[[i]], y = ..1, z = ..2)
i've found them mentioned in r-lang without explanation.
assume points index of argument passed in ...
read more it.
i trying use sys.call
, later in post-processing use match.call
on captured call in above example ends losing lapply ...
arguments, , in example function primitive generic end error ... used in situation not exist
.
match.call
used directly in function without going sys.call
, later match.call
seems way catch info arguments or avoid error in such cases.
prefer understand more deeply, without going r source.
ps. match.call
updated in r 3.2.0. codes above produced on r 3.2.0.