Skip to content

Commit 125bd2c

Browse files
Make it a tibble
1 parent 28eefad commit 125bd2c

2 files changed

Lines changed: 17 additions & 13 deletions

File tree

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
library(readr)
2-
3-
# load data --------------------------------------------------------------------
4-
5-
voter_count <- read.csv("november_voter_turnout.csv")
6-
7-
# cleaning: Change incorrect 0's values to NA
8-
9-
voter_count[voter_count == 0] <- NA
10-
11-
# save -------------------------------------------------------------------------
12-
13-
usethis::use_data(voter_count, overwrite= TRUE)
1+
# load packages ----------------------------------------------------------------
2+
3+
library(readr)
4+
library(usethis)
5+
library(here)
6+
7+
# load data --------------------------------------------------------------------
8+
9+
voter_count <- read_csv(here::here("data-raw/voter_count", "november_voter_turnout.csv"))
10+
11+
# clean data: Change incorrect 0's values to NA --------------------------------
12+
13+
voter_count[voter_count == 0] <- NA
14+
15+
# save -------------------------------------------------------------------------
16+
17+
usethis::use_data(voter_count, overwrite= TRUE)

data/voter_count.rda

96 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)