Copy edits to help
This commit is contained in:
parent
ec502237e2
commit
bf57482aae
|
@ -5,7 +5,7 @@ status("restructuring")
|
|||
```
|
||||
|
||||
This book is not an island; there is no single resource that will allow you to master R.
|
||||
As you start to apply the techniques described in this book to your own data you will soon find questions that we do not answer.
|
||||
As you begin to apply the techniques described in this book to your own data, you will soon find questions that we do not answer.
|
||||
This section describes a few tips on how to get help, and to help you keep learning.
|
||||
|
||||
## Google is your friend
|
||||
|
@ -47,7 +47,9 @@ When creating a reprex by hand, it's easy to accidentally miss something that me
|
|||
Avoid this problem by using the reprex package which is installed as part of the tidyverse.
|
||||
Let's say you copy this code onto your clipboard (or, on RStudio Server or Cloud, select it):
|
||||
|
||||
```{r, eval = FALSE}
|
||||
```{r}
|
||||
#| eval: false
|
||||
|
||||
y <- 1:4
|
||||
mean(y)
|
||||
```
|
||||
|
@ -69,7 +71,9 @@ The relevant bit of GitHub-flavored Markdown is ready to be pasted from your cli
|
|||
|
||||
Here's what that Markdown would look like rendered in a GitHub issue:
|
||||
|
||||
```{r, eval = FALSE}
|
||||
```{r}
|
||||
#| eval: false
|
||||
|
||||
y <- 1:4
|
||||
mean(y)
|
||||
#> [1] 2.5
|
||||
|
@ -90,7 +94,7 @@ Instead of reading from the clipboard, you can:
|
|||
There are three things you need to include to make your example reproducible: required packages, data, and code.
|
||||
|
||||
1. **Packages** should be loaded at the top of the script, so it's easy to see which ones the example needs.
|
||||
This is a good time to check that you're using the latest version of each package; it's possible you've discovered a bug that's been fixed since you installed the package.
|
||||
This is a good time to check that you're using the latest version of each package; it's possible you've discovered a bug that's been fixed since you installed or last updated the package.
|
||||
For packages in the tidyverse, the easiest way to check is to run `tidyverse_update()`.
|
||||
|
||||
2. The easiest way to include **data** in a question is to use `dput()` to generate the R code to recreate it.
|
||||
|
@ -109,6 +113,7 @@ There are three things you need to include to make your example reproducible: re
|
|||
- Use comments to indicate where your problem lies.
|
||||
|
||||
- Do your best to remove everything that is not related to the problem.\
|
||||
|
||||
The shorter your code is, the easier it is to understand, and the easier it is to fix.
|
||||
|
||||
Finish by checking that you have actually made a reproducible example by starting a fresh R session and copying and pasting your script in.
|
||||
|
@ -123,4 +128,4 @@ You might also want to follow Hadley ([\@hadleywickham](https://twitter.com/hadl
|
|||
|
||||
To keep up with the R community more broadly, we recommend reading <http://www.r-bloggers.com>: it aggregates over 500 blogs about R from around the world.
|
||||
If you're an active Twitter user, follow the ([`#rstats`](https://twitter.com/search?q=%23rstats)) hashtag.
|
||||
Twitter is one of the key tools that Hadley uses to keep up with new developments in the community.
|
||||
Twitter is one of the key tools that Hadley and Mine use to keep up with new developments in the community.
|
||||
|
|
Loading…
Reference in New Issue