list.functions.in.file | R Documentation |
Parses all functions called by an R script and then lists them by package. Wrapper for 'getParseData'. Inspired by 'hrbrmstr', on StackExchange 3/1/2015. May be of great use for those developing a package to help see what namespace 'importsFrom' calls will be required.
list.functions.in.file(filename, alphabetic = TRUE)
filename |
path to an R file containing R code. |
alphabetic |
logical, whether to list functions alphabetically. If FALSE, will list in order of appearance. |
Returns a list. Parses all functions called by an R script and then lists them by package. Those from the script itself are listed under '.GlobalEnv' and any functions that may originate from multiple packages have all possibilities listed. Those listed under 'character(0)' are those for which a package could not be found- may be functions within functions, or from packages that aren't loaded.
Nicholas Cooper njcooper@gmx.co.uk
Rfile.index
# not run: rfile <- file.choose() # choose an R script file with functions # not run: list.functions.in.file(rfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.