-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
library(ggvenn)
library(tidyverse)
library(kableExtra)
base <- read_csv("allofus_cohort_combined.csv") %>%
mutate(new_col = "TRUE")
no_white <- base %>%
filter(race != "White")
aa_only <- base %>%
filter(race == "Black or African American")
plot_venn <- function(input, title) {
a <- input %>%
select(
value = person_id,
cohort,
new_col
) %>%
pivot_wider(
names_from = cohort,
values_from = new_col,
values_fill = "FALSE"
) %>%
mutate(
Gettler = (Gettler == "TRUE"),
Wide = (Wide == "TRUE"),
Wide_filtered = (Wide_filtered == "TRUE"),
DCC_Grant = (DCC_Grant == "TRUE")
)
ggvenn(
a,
c(
"Gettler",
"Wide",
"Wide_filtered",
"DCC_Grant"
),
show_percentage = F
) +
labs(title = title)
}
print_table <- function(input, title) {
b <- input %>%
filter(
!cohort %in% c(
"meds-_1icd",
"meds-_2icd",
"meds+_1icd"
)
) %>%
group_by(
cohort,
race
) %>%
tally()
kbl(b)
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels