Skip to content

Commit

Permalink
fix 16 group sus population
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewscolm committed Feb 29, 2024
1 parent 64ded45 commit 4747d45
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions notebooks_r/report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -946,11 +946,11 @@ for (codelist in c("new", "ctv3")) {


```{r}
anyrepeated_new
anyrepeated_ctv3
```
<br>
```{r}
anyrepeated_ctv3
anyrepeated_new
```

## Comparison of 'Latest' and 'Most Frequent' coded ethnicity
Expand Down Expand Up @@ -1309,6 +1309,9 @@ for (codelist in c("new", "ctv3")) {
df_sus_new_cross_perc <- df_sus_new_cross %>%
left_join(ethnicity_cat_pivot, by = "ethnicity") %>%
group_by(ethnicity ) %>%
mutate(population=sum(na.omit(`0`))) %>%
ungroup() %>%
mutate(
percentage = round(`0` / population * 100, 1),
ethnicity = fct_relevel(
Expand Down

0 comments on commit 4747d45

Please sign in to comment.