Skip to content

Instantly share code, notes, and snippets.

@hadley
Created April 4, 2012 20:30
Show Gist options
  • Select an option

  • Save hadley/2305356 to your computer and use it in GitHub Desktop.

Select an option

Save hadley/2305356 to your computer and use it in GitHub Desktop.
f <- function() {
c <- match.call()
c[[1]] <- as.name("get")
c[[2]] <- "get"
c
as.function(c(alist(), c))
}
f()()("x")
f <- function() {
c <- match.call()
c[[1]] <- as.name("get")
c[[2]] <- "get"
body(f) <- c
f
}
f()()("x")
@daroczig

Copy link
Copy Markdown

I have extended my testfile and it seems that those nasty bugs are gone now.
Besides that I could redesign the filtering mechanism and made it a lot simpler (with a not so neat hack of modifying formula.character) which seems to make its job ATM. Your really appreciated feedback is still really welcomed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment