beautypg.com

Ex: indentation, Code, Corrected code – Google RLint: Reformatting R Code to Follow the Google Style Guide User Manual

Page 10

background image

Google Confidential and Proprietary

Ex: Indentation

Code

if (x == 5)

while (x > 1) #

R-bleed bug

? ;)

x <- x - 1

print(x)

Corrected code

if (x == 5)

while (x > 1)

x <- x - 1

print(x)