When improving the rbind method rbind I would like to extract the names of the objects passed to it so that I can generate unique identifiers from them.
I tried all.names(match.call()) but this just gives me:
[1] "rbind" "deparse.level" "..1" "..2"
General example:
rbind.test <- function(...) { dots <- list(...) all.names(match.call()) } t1 <- t2 <- "" class(t1) <- class(t2) <- "test" > rbind(t1,t2) [1] "rbind" "deparse.level" "..1" "..2"
While I would like to get c("t1","t2") .
I know that in the general case it is impossible to get the names of the objects passed in the function, but it looks like ... it is possible that, as substitute(...) returns t1 in the above example.
r
Ari B. Friedman Sep 14 2018-12-12T00: 00Z
source share