]> code.communitydata.science - stats_class_2020.git/blobdiff - r_tutorials/w05a-R_tutorial.rmd
typos and fine-tuning
[stats_class_2020.git] / r_tutorials / w05a-R_tutorial.rmd
index f079d7e766bfaf96b85a258035ac3540b2c78289..c1ef50a8fa13e01108bc1b2dd7928c68a015c53d 100644 (file)
@@ -38,7 +38,7 @@ d <- read_csv(data_url)
 d
 ```
 
 d
 ```
 
-For the sake of my examples, I'm planning to work with the `date`, `state`, `cases`, and `deaths` variables. Notice that by using the `read_csv()` function to import the data, R already recognizes the `date` column as dates. Also notice that the column names for cases and deaths don't reflect the fact that both variables are *cumulative* counts. Also also, notice that it looks like I need to convert the state variable to a factor. I'll start there and then get a quick sense of how much data I have for each state with a univariate table.
+For the sake of my examples, I'm planning to work with the `date`, `state`, `cases`, and `deaths` variables. Notice that by using the `read_csv()` function to import the data, R already recognizes the `date` column as dates. Also notice that the column names for cases and deaths don't reflect the fact that both variables are *cumulative* counts. Also also, notice that it looks like I will want to convert the state variable to a factor (since that's a more accurate representation of the data and it will likely make my analysis/plotting work easier later on). I'll start there and then get a quick sense of how much data I have for each state with a univariate table.
 ```{r}
 d$state <- factor(d$state)
 table(d$state)
 ```{r}
 d$state <- factor(d$state)
 table(d$state)

Community Data Science Collective || Want to submit a patch?