Learn R Programming

EpidigiR (version 0.1.2)

epi_prevalence: Disease Prevalence Data by Region and Age Group

Description

A dataset containing disease prevalence data across different regions and age groups, including spatial coordinates.

Usage

epi_prevalence

Arguments

Format

A data frame with 12 rows and 7 columns:

region

Character, region name (e.g., North, South, East, West).

age_group

Character, age group (e.g., 0-19, 20-59, 60+).

cases

Numeric, number of disease cases.

population

Numeric, population size in the region and age group.

prevalence

Numeric, prevalence percentage (cases / population * 100).

lat

Numeric, latitude for spatial mapping.

lon

Numeric, longitude for spatial mapping.

Examples

Run this code
data("epi_prevalence")
library(sp)
coordinates(epi_prevalence) <- ~lon+lat
epi_visualize(epi_prevalence, x = "prevalence", type = "map")
epi_analyze(epi_prevalence,outcome    = "cases",population = "population",type       = "summary")
if (interactive()) {
epi_prevalence$region_id <- as.numeric(factor(epi_prevalence$region))
epi_visualize(epi_prevalence, x = "region_id", y = "prevalence", type = "scatter")
with(epi_prevalence, axis(1, at = unique(region_id), labels = levels(factor(region))))
}

Run the code above in your browser using DataLab