You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
9 Anything Else 63.3000 R rom comedy 3.21200 3212000. romantic comedy
343
+
10 Bad Boys II 38.1000 R action 138.397 138397000 action </code></pre>
344
344
<p>Do the same here, but return <code>"not romantic comedy"</code> if <code>type</code> is not <code>"rom comedy"</code> and this time overwrite the original <code>type</code> variable:</p>
<p>Here are some questions you can ask yourself at this stage of an EDA: Which variables are numerical? Which are categorical? For the categorical variables, what are their levels? Besides the variables we’ll be using in our regression model, what other variables do you think would be useful to use in a model for predicting house price?</p>
230
230
<p>Observe, for example, with the raw data that while the <code>condition</code> variable has values <code>1</code> through <code>5</code>, these are saved in R as <code>fct</code> standing for “factors.” Recall this is one of R’s ways of saving categorical variables. So you should think of these as the “labels” <code>1</code> through <code>5</code> and not the numerical values <code>1</code> through <code>5</code>.</p>
231
231
<p>Let’s now perform the second step in an EDA: computing summary statistics. Recall from Section <ahref="wrangling.html#summarize">3.3</a> that <em>summary statistics</em> are single numerical values that summarize a large number of values. Examples of summary statistics include the mean, the median, the standard deviation, and various percentiles.</p>
<p>We’ll focus on the number of <code>births</code> for each <code>date</code>, but only for births that occurred in 1999. Recall from Section <ahref="wrangling.html#filter">3.2</a> we can do this using the <code><ahref="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function from the <code>dplyr</code> package:</p>
0 commit comments