Created
July 13, 2015 14:30
-
-
Save hoxo-m/0001a3e0732413086c7e to your computer and use it in GitHub Desktop.
R のソースから関数を抽出
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list_funcs <- function(file) { | |
Filter(function(expr) { | |
expr <- as.character(expr) | |
length(expr) == 3 && substring(expr[3], 1, 9) == "function(" | |
}, as.list(parse(file))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment