-
Notifications
You must be signed in to change notification settings - Fork 4
R Code Style Guide
We will be using the google R code style guide. You can find it here: https://google.github.io/styleguide/Rguide.xml#identifiers
A tutorial of the guidelines is under construction.
We will use the following R lintr package.
https://github.com/jimhester/lintr
Default Lintr settings are based on Hadley Wickham's Style Guide:
http://r-pkgs.had.co.nz/style.html
Default Lintr Settings:
assignment_linter
single_quotes_linter
absolute_paths_linter
no_tab_linter
line_length_linter
commas_linter
infix_spaces_linter
spaces_left_parentheses_linter
spaces_inside_linter
open_curly_linter
closed_curly_linter
camel_case_linter
multiple_dots_linter
object_length_linter
object_usage_linter
trailing_whitespace_linter
trailing_blank_lines_linter
commented_code_linter
How to apply changes the lintr defaults to follow the Team Style Guide (Google R Style Guide):
lint(file = "testscript.R", linters =
lintr::with_defaults(
camel_case_linter = NULL,
snake_case_linter = NULL
)
)
#bestteamevar