|
2 | 2 | title: "Exploratory Data Analysis 1"
|
3 | 3 | subtitle: "R Notes"
|
4 | 4 | author: "Luc Anselin and Grant Morrison^[University of Chicago, Center for Spatial Data Science -- [email protected],[email protected]]"
|
5 |
| -date: "08/09/2018" |
| 5 | +date: "latest update 09/03/2018" |
6 | 6 | output:
|
7 | 7 | html_document:
|
8 | 8 | fig_caption: yes
|
@@ -61,7 +61,7 @@ Below follows a list of the commands used in this notebook. For further details
|
61 | 61 | and a comprehensive list of options, please consult the
|
62 | 62 | [R documentation](https://www.rdocumentation.org).
|
63 | 63 |
|
64 |
| -- **Base R**: `install.packages`, `library`, `head`, `names`, `summary`, `range`, `var`, `sd`,`pdf`,`dev.off`,`saveRDS`,`readRDS`, `function`, `lm`, `str`, `dim` |
| 64 | +- **Base R**: `setwd`, `install.packages`, `library`, `head`, `names`, `summary`, `range`, `var`, `sd`,`pdf`,`dev.off`,`saveRDS`,`readRDS`, `function`, `lm`, `str`, `dim` |
65 | 65 |
|
66 | 66 | - **tidyverse**: `read_csv`, `rename`, `mutate`, `if_else`, `filter`
|
67 | 67 |
|
@@ -150,7 +150,7 @@ are covered in Wickham's *ggplot2: elegant graphics for data analysis (2nd Editi
|
150 | 150 | The logic behind **ggplot** is an implementation of Wilkinson's *grammar for graphics*,
|
151 | 151 | using the concept of *layers*. These are the components that make up a plot, such as a *data set*, *aesthetic mappings* (variables for different aspects of the graph, such
|
152 | 152 | as the x and y-axes, colors, shapes, etc.), *statistical transformations*, a
|
153 |
| -*geometric object* and position adjustments. Several layers can be drawn on top of each other, providing the ability to create incredibly complext graphs. |
| 153 | +*geometric object* and position adjustments. Several layers can be drawn on top of each other, providing the ability to create incredibly complex graphs. |
154 | 154 |
|
155 | 155 | For now, the main parts to concentrate on are the data set and the aesthetics,
|
156 | 156 | or `aes`. The latter are typically (at least) the variables to be plotted. These
|
@@ -540,7 +540,7 @@ base.plt +
|
540 | 540 | As before, we can write this plot to a file using `ggsave`, or save the object for future use with `saveRDS`.
|
541 | 541 |
|
542 | 542 | ## Bivariate Analysis: The Scatter Plot {-}
|
543 |
| -The scatter plot shows the relationship between two variables as points with |
| 543 | +The scatter plot shows the relationship between two variables as points with cartesian |
544 | 544 | (x, y) coordinates matching the value for each variable, one on the x-axis, the
|
545 | 545 | other on the y-axis. In **ggplot** the scatter plot is constructed by means
|
546 | 546 | of a `geom_point`. The aesthetics are mapped to the variables for the x and y axis.
|
|
0 commit comments