From 0c65570bb4ccee176c6836b24f77c6ff21eb8f5f Mon Sep 17 00:00:00 2001 From: Terence Teo Date: Sat, 23 Jul 2016 14:48:18 -0400 Subject: [PATCH] fixed three typos in visualize.Rmd (#180) --- visualize.Rmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/visualize.Rmd b/visualize.Rmd index 3079239..020fb6d 100644 --- a/visualize.Rmd +++ b/visualize.Rmd @@ -5,7 +5,7 @@ > "The simple graph has brought more information to the data analyst’s mind > than any other device." --- John Tukey -This chapter will teach you how to visualize your data ggplot2. R has several systems for making graphs, but ggplot2 is one of the most elegant and most versatile. ggplot2 implements the __grammar of graphics__, a coherent system for describing and building graphs. With ggplot2, you can do more faster by learning one system and applying it in many places. +This chapter will teach you how to visualize your data using ggplot2. R has several systems for making graphs, but ggplot2 is one of the most elegant and most versatile. ggplot2 implements the __grammar of graphics__, a coherent system for describing and building graphs. With ggplot2, you can do more faster by learning one system and applying it in many places. ### Prerequisites @@ -231,13 +231,13 @@ ggplot(data = mpg) If you're still stuck, try the help. You can get help about any R function by runnning `?function_name` in the console, or selecting the function name and pressing F1 in RStudio. Don't worry if the help doesn't seem that helpful - instead skip down to the examples and look for code that matches what you're trying to do. -If that doesn't help, carefully read the error message. Sometimes the answer will be buried there! But when you're new to R, the answer might be but you don't yet know how to understand it. Another great tool is google: trying googling the error message, as it's likely someone else has had the same problem, and have gotten help online. +If that doesn't help, carefully read the error message. Sometimes the answer will be buried there! But when you're new to R, the answer might be in the error message but you don't yet know how to understand it. Another great tool is google: trying googling the error message, as it's likely someone else has had the same problem, and have gotten help online. ## Facets One way to add additional variables is with aesthetics. Another way, particularly useful for categorical variables, is to split your plot into __facets__, subplots that each display one subset of the data. -To facet you plot by a single variable, use `facet_wrap()`. The first argument of should be a formula, which you create with `~` followed by a variable name (here "formula" is the name of a data structure in R, not a synonym for "equation"). The variable that you pass to `facet_wrap()` should be discrete. +To facet your plot by a single variable, use `facet_wrap()`. The first argument of `facet_wrap()` should be a formula, which you create with `~` followed by a variable name (here "formula" is the name of a data structure in R, not a synonym for "equation"). The variable that you pass to `facet_wrap()` should be discrete. ```{r} ggplot(data = mpg, mapping = aes(x = displ, y = hwy)) +