Google RLint: Reformatting R Code to Follow the Google St Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Software Google RLint: Reformatting R Code to Follow the Google St herunter. Google RLint: Reformatting R Code to Follow the Google Style Guide User Manual [en] Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 19
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
RLint: Reformatting R
Code to Follow the
Google Style Guide
Alex Blocker, Andy Chen ([email protected]),
Andy Chu, Tim Hesterberg, Jeffrey D. Oldham, Caitlin
Sadowski, Tom Zhang
2014-07-02
Seitenansicht 0
1 2 3 4 5 6 ... 18 19

Inhaltsverzeichnis

Seite 1 - Google Style Guide

RLint: Reformatting R Code to Follow the Google Style GuideAlex Blocker, Andy Chen ([email protected]), Andy Chu, Tim Hesterberg, Jeffrey D. Oldham, C

Seite 2

Google Confidential and ProprietaryEx: IndentationCodeif (x == 5)while (x > 1) # R-bleed bug? ;) x <- x - 1 print(x)Corrected codeif (x =

Seite 3

Google Confidential and ProprietaryEx: Ease checking program correctnessCodex <- -5:-1x[x <-2]Is anything wrong?

Seite 4 - Googler

Google Confidential and ProprietaryEx: Ease checking program correctnessCodex <- -5:-1x[x <-2] # Hmm ...WarningMust have whitespace around &

Seite 5

Google Confidential and ProprietaryEx: Ease checking program correctnessCodeif (format(Sys.time(), "%Y") == "2014") { print(paste

Seite 6

Google Confidential and ProprietaryEx: Ease checking program correctnessCodeif (format(Sys.time(), "%Y") == "2014") { print(paste

Seite 7

Google Confidential and ProprietaryRLint implementation uses PythonUse Python string functions and regular expressions.Algorithm:Stub out comments, st

Seite 8 - Ex: Spacing

Google Confidential and ProprietaryApplication: Improve R community's style consistencyProposal: Adopt R style guide + RLint.● Run experiments to

Seite 9

Google Confidential and ProprietarySummaryRLint checks and reformats R code to follow R style guide.RLint used within Google● Eases checking correctne

Seite 10 - Ex: Indentation

RLint: Reformatting R Code to Follow the Google Style GuideAlex Blocker, Andy Chen ([email protected]), Andy Chu, Tim Hesterberg, Jeffrey D. Oldham, C

Seite 11 - Is anything wrong?

Google Confidential and ProprietaryCoding conventions and checkersCoding conventions have existed for decades.● 1918: The Elements of Style by Strunk

Seite 12

Google Confidential and ProprietarySummaryRLint checks and reformats R code to follow R style guide.RLint used within Google.● Eases checking correctn

Seite 13

Google Confidential and ProprietaryStyle guides improve correctness and productivityQ: How do we produce correct R code when● correctness is hard to c

Seite 14

Google Confidential and ProprietaryMany R files modified by multiple users~50% directories contain code written by >1 Googler.~40% files modified b

Seite 15 - Algorithm:

Google Confidential and ProprietaryStyle guides improve correctness and productivityQ: How do we produce correct R code when● correctness is hard to c

Seite 16

Google Confidential and ProprietaryStyle guides specify program structureGoogle R style guide specifies● identifier naming: variable.name, FunctionNam

Seite 17

Google Confidential and ProprietaryRLint: Automate style checking and correctionGoal: Minimize overhead of following style guide.RLint: Program warnin

Seite 18

Google Confidential and ProprietaryEx: SpacingCode: foo <-function(x){ return (list ( a = sum(x[,1]), b = 1/3+1e-7*(x[1,1])) …Warni

Seite 19 - (70% adoption in 2013)

Google Confidential and ProprietaryEx: IndentationCodeif (x == 5)while (x > 1) x <- x - 1 print(x)Is anything wrong?

Kommentare zu diesen Handbüchern

Keine Kommentare