Description Usage Arguments Value Author(s)
I usually write detailed comment headers before functions in source code files. scenarios: 1. function header preceded by comment block preceded by a blank line, or top of file 2. function header preceded by (blank line or top of file) -> no comment has been written.
1 2 3 | import.function(func, src.root = getOption("src.root"),
src.files = NULL, import.header = TRUE,
exclude.patterns = c("~", ".Rcheck", ".git", ".svn"))
|
func |
a function name, or the function's code |
src.root |
The parent folder of source code |
src.files |
an optional vector of filenames to search within |
import.header |
search for & import the header comments. TRUE/FALSE |
exclude.patterns |
vector of patterns passed to grep for files to exclude |
This code extracts the src code, and the header, or returns ""
Mark Cowley, 2011-04-07
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.