To provide a set of standardized helper functions to enable faster, cleaner and more modular R programming.
This package may be installed using devtools.
install.packages('devtools') # Only needed if you dont have this installed. library(devtools) install_github('adam-m-mcelhinney/helpRFunctions') library(helpRFunctions)
These principles are an evolving document designed to provide guiding principles for this package:
- Clean code is more important than optimized code. This package is not intended to be a bleeding-edge analysis tool for giant data sets.
- Provide the user with common sense defaults, but let them configure as much as possible if they chose.
- Roxygen is a great tool. Let's use it.
- Unit test as much as possible.
- Ensure all assumptions are explicitly checked. If these assumptions fail, then provide a very clear message to the user.
- Longer but more readable names are preferrable (within reason). Most of us are using an IDE or text editor with autocomplete, so longer variable names shouldn't require much more typing.
- Jibberish names are explicitly forbidden.
- Get rid of global variables whenever possible.
- In non-obvious or potentially trickey situations, provide comments that describe why you are doing something.
- If in doubt whether to comment, comment.
- More small functions are preferred to fewer but larger functions.