knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  echo = FALSE,
  warning = FALSE,
  message = FALSE
)
library(tidyverse)
library(tables)
phillipines_data <- read_csv("/Users/gabrielburcea/rprojects/data/your.md/phillipines_data.csv")

Symptoms across age band (20-39; 40-59, 60+)

sympt_pos_age_band_n <- cvindia::sympt_positive_age_band_table(data = phillipines_data)


sympt_pos_age_band_n

(tables::tabular((Symptoms = factor(symptoms)+1)*(total = sum)*(count+perc)~(age_band=factor(age_band))*(tested=factor(covid_tested)), data=sympt_pos_age_band_n))

Comorbidities across age band (20-39; 40-59, 60+)

comorb_age_band_numbers <-  cvindia::comorbidities_age_band_table(phillipines_data)

comorb_age_band_numbers

library(tables)
tables::tabular((Comorbidities = factor(comorbidities)+1)*(total = sum)*(count+perc)~('Age Band' =factor(age_band))*("SARS-Covid-19 status" =factor(covid_tested)), data=comorb_age_band_numbers)


gabrielburcea/cvindia documentation built on Feb. 17, 2021, 3:31 a.m.