A problem I bumped into was that most of Chelsea’s gists don’t actually have .R or .Rmd extensions so my approach skipped most of her snippets. I wanted to parse my own gists but ran into a related problem that most of my github gist code snippets are saved as .md files1.
In this post I…
1. create a function to extract code chunks from simple .md files
2. parse the functions and packages in my code using funspotr.
Click through to see the code in action.