Skip to content

Commit f84c46f

Browse files
removing OCS package from lab
1 parent e0499e5 commit f84c46f

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

modules/Subsetting_Data_in_R/lab/Subsetting_Data_in_R_Lab_Key.Rmd

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,19 @@ In this lab you can use the interactive console to explore but please record you
1616
Now we will work with the `county_pop` data from the same case study.
1717

1818

19-
20-
First let's get the OCSdata package if we haven't already. We added an argument here so you don't have to select a mirror.
21-
22-
```{r}
23-
install.packages("OCSdata", repos='http://cran.us.r-project.org')
24-
```
25-
2619
```{r, message = FALSE}
2720
# don't forget to load the packages that you will need!
2821
library(dplyr)
2922
library(tidyverse)
30-
library(OCSdata)
31-
```
32-
33-
34-
There are two ways to get the data- either one is fine. We give you two options in case you have challenges:
35-
1) importing the csv
36-
2) using the OCSdata package
37-
38-
```{r}
39-
40-
county_pop <- read_csv("https://jhudatascience.org/intro_to_r/data/county_pop.csv")
41-
4223
```
4324

44-
Or we can load the data from this package:
45-
```{r}
46-
OCSdata::load_imported_data("ocs-bp-opioid-rural-urban")
47-
```
4825

26+
Import the data from "https://jhudatascience.org/intro_to_r/data/county_pop.csv" using `read_csv` and assign the data to an object called `county_pop`.
4927
Check that it worked by seeing if you have the `county_pop` data.
5028

5129
```{r 0response}
52-
county_pop
30+
county_pop <- read_csv("https://jhudatascience.org/intro_to_r/data/county_pop.csv")
31+
head(county_pop)
5332
```
5433

5534
### 1.1

0 commit comments

Comments
 (0)