Google RLint: Reformatting R Code to Follow the Google St Instrukcja Użytkownika

Przeglądaj online lub pobierz Instrukcja Użytkownika dla Oprogramowanie Google RLint: Reformatting R Code to Follow the Google St. Google RLint: Reformatting R Code to Follow the Google Style Guide User Manual [en] Instrukcja obsługi

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 19
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
Przeglądanie stron 0
1 2 3 4 5 6 ... 18 19

Podsumowanie treści

Strona 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

Strona 2

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

Strona 3

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

Strona 4 - Googler

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

Strona 5

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

Strona 6

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

Strona 7

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

Strona 8 - Ex: Spacing

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

Strona 9

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

Strona 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

Strona 11 - Is anything wrong?

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

Strona 12

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

Strona 13

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

Strona 14

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

Strona 15 - Algorithm:

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

Strona 16

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

Strona 17

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

Strona 18

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

Strona 19 - (70% adoption in 2013)

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

Komentarze do niniejszej Instrukcji

Brak uwag