-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.Rmd
29 lines (21 loc) · 1.36 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
title: "The tidyverse style guide"
author: ["Hadley Wickham"]
site: bookdown::bookdown_site
output: bookdown::bs4_book
github-repo: tidyverse/style
documentclass: book
---
# Welcome {-}
Good coding style is like correct punctuation: you can manage without it, butitsuremakesthingseasiertoread. This site describes the style used throughout the [tidyverse](http://tidyverse.org). It was derived from Google's original R Style Guide - but
Google's [current guide](https://google.github.io/styleguide/Rguide.html) is derived from the tidyverse style guide.
All style guides are fundamentally opinionated. Some decisions genuinely do make code easier to use (especially matching indenting to programming structure), but many decisions are arbitrary. The most important thing about a style guide is that it provides consistency, making code easier to write because you need to make fewer decisions.
Two R packages support this style guide:
* [styler](http://styler.r-lib.org) allows you to interactively restyle
selected text, files, or entire projects. It includes an RStudio add-in,
the easiest way to re-style existing code.
```{r, echo = FALSE, fig.align = "center"}
knitr::include_graphics("styler-addin.png", dpi = 220)
```
* [lintr](https://github.com/jimhester/lintr) performs automated checks
to confirm that you conform to the style guide.