get_category_strings: get_category_strings()

View source: R/get_category_strings.R

get_category_stringsR Documentation

get_category_strings()

Description

The function will attempt to locate a Bureau's categorical variable by name and return a dataframe with both the integer values and corresponding label strings. If the variable is not located then NULL is returned. Definitions for the variables were obtained from Population Estimates Categorical Variables and other Bureau sources.

Usage

get_category_strings(get_names = FALSE, name, start_idx = NULL, end_idx = NULL)

Arguments

get_names

A logical which if TRUE the function will return a vector of categorical variable names recognized by the function.

name

A string that is the name of the categorical variable of interest.

start_idx

An integer that sets the starting row index of the returned dataframe. If the value is NULL, then the entire dataframe is returned.

end_idx

An integer that sets the ending row index of the returned dataframe.

Details

For a Census Bureau categorical variable return a dataframe with the variable's integer values and corresponding label strings.

Value

A dataframe with the variables integer values and corresponding label strings.

Author(s)

Rick Dean


deandevl/Rcensus documentation built on Aug. 9, 2022, 8:24 p.m.