Calculate a NMDP Genotypic Frequency Table by Census Tracts within a State
Source:R/calculate_county_census_tract_allele_frequencies.R
calculate_county_census_tract_allele_frequencies.Rd
This function calculates a genotypic frequency table for a specified HLA allele by census tracts within a given state, adjusted to the 2020 Census population data. It also provides a shapefile for visualization.
Value
A list containing:
- us_population_race_code_percentages
A data frame with population percentages by race codes.
- nmdp_freq_subset
A data frame with adjusted genotypic frequencies for the specified allele.
- sf_data
Spatial data (shapefile) for the state's census tracts.
- shapefile_path
The file path to the shapefile used.