- Use
html_table to clean up table
- Recall
magrittr and dplyr pipes!
library(dplyr)
library(magrittr)
# convert object to table
us_inc_table %<>%
html_table()
#take another look
us_inc_table %>%
head()
## [[1]]
## # A tibble: 20 × 3
## Year Count Rate
## <int> <chr> <int>
## 1 1940 264,834 201
## 2 1950 264,620 176
## 3 1960 346,015 193
## 4 1970 328,020 161
## 5 1980 503,586 220
## 6 1985 744,208 311
## 7 1990 1,148,702 457
## 8 1995 1,585,586 592
## 9 2000 1,937,482 683
## 10 2002 2,033,022 703
## 11 2004 2,135,335 725
## 12 2006 2,258,792 752
## 13 2008 2,307,504 755
## 14 2010 2,270,142 731
## 15 2012 2,228,424 707
## 16 2014 2,217,947 693
## 17 2016 2,157,800 666
## 18 2018 2,102,400 642
## 19 2020 1,675,400 505
## 20 2021 1,767,200 531