-
Notifications
You must be signed in to change notification settings - Fork 11
Standards (file, folder and object names, coding)
- coding
-
Google style guide https://google.github.io/styleguide/Rguide.xml
-
lintr package, gives style and syntax alerts: https://github.com/jimhester/lintr
-
styler package to update styles in a file: https://github.com/r-lib/styler
-
https://swcarpentry.github.io/r-novice-inflammation/06-best-practices-R/
Use commented lines of - and = to break up your file into easily readable chunks.
In code, use comments to explain the “why” not the “what” or “how”. Each line of a comment should begin with the comment symbol and a single space: #.
Variable and function names should use only lowercase letters, numbers, and . Use underscores () (so called snake case) to separate words within a name. Generally, variable names should be nouns and function names should be verbs. Strive for names that are concise and meaningful (this is not easy!).
strive to use verbs for function names: