From 82555e4a7b0638660384b8c26e96dad7a76b5b00 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 26 Sep 2026 04:01:58 -0400 Subject: [PATCH] Update r style guide PiperOrigin-RevId: 988536167 --- Rguide.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Rguide.md b/Rguide.md index de27371..276de8d 100644 --- a/Rguide.md +++ b/Rguide.md @@ -11,6 +11,10 @@ were developed in collaboration with the internal R user community. The rest of this document explains Google's primary differences with the Tidyverse guide, and why these differences exist. +Google uses the [styler](https://github.com/r-lib/styler) package on every +checked in file to ensure code consistency and help reviewers focus on more +important issues. + ## Syntax ### Naming conventions @@ -95,8 +99,8 @@ understand dependencies in your code. There are some exceptions to this rule. * Infix functions (`%name%`) always need to be imported. * Certain `rlang` pronouns, notably `.data`, need to be imported. * Functions from default R packages, including `datasets`, `utils`, - `grDevices`, `graphics`, `stats` and `methods`. If needed, you can `@import` - the full package. + `grDevices`, `graphics`, `stats` and `methods`. If needed, you can `@import` + the full package. When importing functions, place the `@importFrom` tag in the Roxygen header above the function where the external dependency is used. @@ -107,3 +111,9 @@ above the function where the external dependency is used. All packages should have a package documentation file, in a `packagename-package.R` file. + +## Errors + +### Use of bullets + +We prefer ASCII style bullets (`*`) to unicode when producing error messages.