@@ -89,7 +89,7 @@ tongues in Canada, and how many people speak each of them?*
89
89
Every good data analysis begins with a * question* &mdash ; like the
90
90
above&mdash ; that you aim to answer using data. As it turns out, there
91
91
are actually a number of different * types* of question regarding data:
92
- descriptive, exploratory, inferential, predictive , causal, and mechanistic,
92
+ descriptive, exploratory, predictive, inferential , causal, and mechanistic,
93
93
all of which are defined in Table \@ ref(tab: questions-table ).
94
94
Carefully formulating a question as early as possible in your analysis&mdash ; and
95
95
correctly identifying which type of question it is&mdash ; will guide your overall approach to
@@ -174,10 +174,12 @@ Since we are using R for data analysis in this book, the first step for us is to
174
174
load the data into R. When we load tabular data into
175
175
R, it is represented as a * data frame* object\index{data frame!overview}. Figure
176
176
\@ ref(fig: img-spreadsheet-vs-dataframe ) shows that an R data frame is very similar
177
- to a spreadsheet. We refer to the rows as \index{observation} ** observations** ; these are the things that we
178
- collect the data on, e.g., voters, cities, etc. We refer to the columns as \index{variable}
179
- ** variables** ; these are the characteristics of those observations, e.g., voters' political
180
- affiliations, cities' populations, etc.
177
+ to a spreadsheet. We refer to the rows as \index{observation} ** observations** ;
178
+ these are the individual objects
179
+ for which we collect data. In Figure \@ ref(fig: img-spreadsheet-vs-dataframe ), the observations are
180
+ languages. We refer to the columns as ** variables** ; these are the characteristics of each
181
+ observation. In Figure \@ ref(fig: img-spreadsheet-vs-dataframe ), the variables are the the
182
+ language's category, its name, the number of mother tongue speakers, etc.
181
183
182
184
``` {r img-spreadsheet-vs-dataframe, echo = FALSE, message = FALSE, warning = FALSE, fig.align = "center", fig.cap = "A spreadsheet versus a data frame in R.", out.width="100%", fig.retina = 2}
183
185
knitr::include_graphics("img/intro/spreadsheet_vs_dataframe.png")
0 commit comments