Here's a resume of R coding style guidelines from various sources. Something to keep in my mind also.
"...11. When summarizing the results of your output, I recommend working with "display()" (from the arm package) rather than "summary()". The summary() function always seems to give a lot of crap, and we've tried to be cleaner and more focused with display(). One option is to set up functions for both so that users can typically use display(), with some extra information in summary()." ...
...Use a system to name a function...
... Don't use underscores (
_) or hyphens (
-) in identifiers. Identifiers should be named according to the following conventions. The preferred form for variable names is all lower case letters and words separated with dots (
variableNameis also accepted; function names have initial capital letters and no dots (
FunctionName); constants are named like functions but with an initial
Here are few examples:
Happy coding :-)
- Make function names verbs.
- Exception: When creating a classed object, the function name (constructor) and class should match (e.g., lm).