Dictation and grammar corrections for chapters 1-4 (#776)
This commit is contained in:
parent
09d84c4c5a
commit
b12102f673
|
@ -10,7 +10,7 @@ Data science is a huge field, and there's no way you can master it by reading a
|
|||
knitr::include_graphics("diagrams/data-science.png")
|
||||
```
|
||||
|
||||
First you must __import__ your data into R. This typically means that you take data stored in a file, database, or web API, and load it into a data frame in R. If you can't get your data into R, you can't do data science on it!
|
||||
First you must __import__ your data into R. This typically means that you take data stored in a file, database, or web application programming interface (API), and load it into a data frame in R. If you can't get your data into R, you can't do data science on it!
|
||||
|
||||
Once you've imported your data, it is a good idea to __tidy__ it. Tidying your data means storing it in a consistent form that matches the semantics of the dataset with the way it is stored. In brief, when your data is tidy, each column is a variable, and each row is an observation. Tidy data is important because the consistent structure lets you focus your struggle on questions about the data, not fighting to get the data into the right form for different functions.
|
||||
|
||||
|
@ -73,7 +73,7 @@ We think R is a great place to start your data science journey because it is an
|
|||
|
||||
### Non-rectangular data
|
||||
|
||||
This book focuses exclusively on rectangular data: collections of values that are each associated with a variable and an observation. There are lots of datasets that do not naturally fit in this paradigm: including images, sounds, trees, and text. But rectangular data frames are extremely common in science and industry, and we believe that they are a great place to start your data science journey.
|
||||
This book focuses exclusively on rectangular data: collections of values that are each associated with a variable and an observation. There are lots of datasets that do not naturally fit in this paradigm, including images, sounds, trees, and text. But rectangular data frames are extremely common in science and industry, and we believe that they are a great place to start your data science journey.
|
||||
|
||||
### Hypothesis confirmation
|
||||
|
||||
|
@ -157,7 +157,6 @@ The previous section showed you a couple of examples of running R code. Code in
|
|||
|
||||
```{r, eval = TRUE}
|
||||
1 + 2
|
||||
#> [1] 3
|
||||
```
|
||||
|
||||
If you run the same code in your local console, it will look like this:
|
||||
|
@ -183,7 +182,7 @@ Throughout the book we use a consistent set of conventions to refer to code:
|
|||
|
||||
## Getting help and learning more
|
||||
|
||||
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 I do not answer. This section describes a few tips on how to get help, and to help you keep learning.
|
||||
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. This section describes a few tips on how to get help, and to help you keep learning.
|
||||
|
||||
If you get stuck, start with Google. Typically adding "R" to a query is enough to restrict it to relevant results: if the search isn't useful, it often means that there aren't any R-specific results available. Google is particularly useful for error messages. If you get an error message and you have no idea what it means, try googling it! Chances are that someone else has been confused by it in the past, and there will be help somewhere on the web. (If the error message isn't in English, run `Sys.setenv(LANGUAGE = "en")` and re-run the code; you're more likely to find help for English error messages.)
|
||||
|
||||
|
@ -224,7 +223,7 @@ Finish by checking that you have actually made a reproducible example by startin
|
|||
|
||||
You should also spend some time preparing yourself to solve problems before they occur. Investing a little time in learning R each day will pay off handsomely in the long run. One way is to follow what Hadley, Garrett, and everyone else at RStudio are doing on the [RStudio blog](https://blog.rstudio.org). This is where we post announcements about new packages, new IDE features, and in-person courses. You might also want to follow Hadley ([\@hadleywickham](https://twitter.com/hadleywickham)) or Garrett ([\@statgarrett](https://twitter.com/statgarrett)) on Twitter, or follow [\@rstudiotips](https://twitter.com/rstudiotips) to keep up with new features in the IDE.
|
||||
|
||||
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` hashtag. Twitter is one of the key tools that Hadley uses to keep up with new developments in the community.
|
||||
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.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Workflow: basics
|
||||
|
||||
You now have some experience running R code. I didn't give you many details, but you've obviously figured out the basics, or you would've thrown this book away in frustration! Frustration is natural when you start programming in R, because it is such a stickler for punctuation, and even one character out of place will cause it to complain. But while you should expect to be a little frustrated, take comfort in that it's both typical and temporary: it happens to everyone, and the only way to get over it is to keep trying.
|
||||
You now have some experience running R code. We didn't give you many details, but you've obviously figured out the basics, or you would've thrown this book away in frustration! Frustration is natural when you start programming in R, because it is such a stickler for punctuation, and even one character out of place will cause it to complain. But while you should expect to be a little frustrated, take comfort in that it's both typical and temporary: it happens to everyone, and the only way to get over it is to keep trying.
|
||||
|
||||
Before we go any further, let's make sure you've got a solid foundation in running R code, and that you know about some of the most helpful RStudio features.
|
||||
|
||||
|
@ -32,7 +32,7 @@ You will make lots of assignments and `<-` is a pain to type. Don't be lazy and
|
|||
|
||||
## What's in a name?
|
||||
|
||||
Object names must start with a letter, and can only contain letters, numbers, `_` and `.`. You want your object names to be descriptive, so you'll need a convention for multiple words. I recommend __snake_case__ where you separate lowercase words with `_`.
|
||||
Object names must start with a letter, and can only contain letters, numbers, `_` and `.`. You want your object names to be descriptive, so you'll need a convention for multiple words. We recommend __snake_case__ where you separate lowercase words with `_`.
|
||||
|
||||
```{r, eval = FALSE}
|
||||
i_use_snake_case
|
||||
|
|
Loading…
Reference in New Issue