Skip to content

Instantly share code, notes, and snippets.

@nassimhaddad
Created June 23, 2015 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nassimhaddad/b2025f02f0a58f808bfe to your computer and use it in GitHub Desktop.
Save nassimhaddad/b2025f02f0a58f808bfe to your computer and use it in GitHub Desktop.
Here's how to capture the call to a function - from within that function. And to get it into a string using deparse().
# source: http://r.789695.n4.nabble.com/get-arguments-passed-to-function-inside-a-function-td3783894.html
tmpfun2 <- function(x,y,z,...) {
( match.call() )
}
temp <- (tmpfun2(1,2,3))
temp <- deparse(temp)
class(temp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment