View source: R/pl_select_standard.R
pl_select_standard | R Documentation |
Selects the standard set of basic population groups and VAP groups. Optionally renames them from the PXXXYYYY naming convention (where XXX is the table and YYYY is the variable) to more human readable names. pop_* is the total population, from tables 1 and 2, while vap_* is the 18+ population (voting age population).
pl_select_standard(pl, clean_names = TRUE)
pl |
A list of PL tables, as read in by |
clean_names |
whether to clean names |
If clean names=TRUE
, then the variables extracted are as follows:
\*_hisp
: Hispanic or Latino (of any race)
\*_white
: White alone, not Hispanic or Latino
\*_black
: Black or African American alone, not Hispanic or Latino
\*_aian
: American Indian and Alaska Native alone, not Hispanic or Latino
\*_asian
: Asian alone, not Hispanic or Latino
\*_nhpi
: Native Hawaiian and Other Pacific Islander alone, not Hispanic or Latino
\*_other
: Some Other Race alone, not Hispanic or Latino
\*_two
: Population of two or more races, not Hispanic or Latino
where \* is pop
or vap
.
A tibble with the selected and optionally renamed columns
pl_ex_path <- system.file('extdata/ri2018_2020Style.pl', package = 'PL94171') pl <- pl_read(pl_ex_path) pl <- pl_select_standard(pl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.