Description Usage Arguments Details Value Author(s) Examples
This function finds and returns the name of the function calling it. This can be useful, for example, when generating functions algorithmically.
1 2 3 | curfnfinder(skipframes = 0, skipnames = "(FUN)|(.+apply)|(replicate)",
retIfNone = "Not in function", retStack = FALSE,
extraPrefPerLevel = "\t")
|
skipframes |
Number of frames to skip; useful when called from an anonymous function. |
skipnames |
A regular expression specifying which substrings to delete. |
retIfNone |
What to return when called from outside a function. |
retStack |
Whether to return the entire stack or just one function. |
extraPrefPerLevel |
Extra prefixes to return for each level of the function. |
This function was written by Nick Sabbe for his package addendum
.
He posted it on Stack Exchange at
http://stackoverflow.com/questions/7307987/logging-current-function-name
and I included this here with this permission.
The current function.
Nick Sabbe (Arteveldehogeschool)
Maintainer: Gjalt-Jorn Peters <gjalt-jorn@userfriendlyscience.com>
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.