Hello Biostars community,
Two of the things that occupy my mind the most are reproducible research and teaching skills to to others. I have been recently thinking of creating my own R package to distribute and document functions that I wrote. My goal for the immediate term is not to have the package in CRAN, but rather to distribute it (e.g. via GitHub) to workplace colleagues who can potentially use it. In your experience, is it worth it to create an R package to distribute functions, or documenting scripts with R Markdown is enough? What are the benefits of creating and documenting packages vs. other approaches?
The answer is already in the question
If you have some regular tasks for which you have written some functions, it would definitely worth it to make a small library.
Advantages?
install_github()
fromdevtools
library (especially useful if you are working on different servers)Of course it is.
And what do you mean by other approaches ? (not creating a library ?)
Thank you very much your answer, @venu. Yes, by other approaches I meant not creating a library, but sharing R scripts and R Markdown documentation via Github instead.
If the
documentation
is proper sharing via GitHub is also fine, using functions throughsource
function is one way instead of creating library.