Google RLint: Reformatting R Code to Follow the Google St Manual de usuario Pagina 1

Busca en linea o descarga Manual de usuario para Software Google RLint: Reformatting R Code to Follow the Google St. Google RLint: Reformatting R Code to Follow the Google Style Guide User Manual [en] Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 19
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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
Vista de pagina 0
1 2 3 4 5 6 ... 18 19

Indice de contenidos

Pagina 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

Pagina 2

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

Pagina 3

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

Pagina 4 - Googler

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

Pagina 5

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

Pagina 6

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

Pagina 7

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

Pagina 8 - Ex: Spacing

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

Pagina 9

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

Pagina 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

Pagina 11 - Is anything wrong?

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

Pagina 12

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

Pagina 13

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

Pagina 14

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

Pagina 15 - Algorithm:

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

Pagina 16

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

Pagina 17

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

Pagina 18

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

Pagina 19 - (70% adoption in 2013)

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

Comentarios a estos manuales

Sin comentarios