snippets for R functions and documentation