Skip to contents

This function returns a data frame about education demographics from State Cancer Profiles.

Usage

demo_education(area, areatype, education, sex = NULL, race = NULL)

Arguments

area

A state/territory abbreviation or USA.

areatype

One of the following values:

  • "county"

  • "hsa" (Health Service Area)

  • "state".

education

One of the following values:

  • "less than 9th grade"

  • "at least high school"

  • "at least bachelors degree".

sex

One of the following values:

  • "both sexes"

  • "male"

  • "female".

race

One of the following values:

  • "All Races (includes Hispanic)"

  • "White (includes Hispanic)"

  • "White non-Hispanic"

  • "Black"

  • "Amer. Indian/Alaskan Native (includes Hispanic)"

  • "Asian or Pacific Islander (includes Hispanic)"

  • "Hispanic (Any Race).

Value

A data frame with the following columns: Area Type, Area Code, Percent, Households, Rank.

Examples

if (FALSE) {
demo_education(
  area = "wa",
  areatype = "county",
  education = "at least high school",
  sex = "males"
)

demo_education(
  area = "usa",
  areatype = "state",
  education = "at least bachelors degree",
  sex = "both sexes",
  race = "all races (includes hispanic)"
)

demo_education(
  area = "pr",
  areatype = "hsa",
  education = "less than 9th grade"
)
}