Skip to content

Commit

Permalink
fix data-dict, local-hosp: add code to determine number of "" in desc…
Browse files Browse the repository at this point in the history
…ription field
  • Loading branch information
ercbk committed Sep 1, 2021
1 parent 5e3887b commit fe0142d
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions vignettes/data-dictionary.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,19 @@ Other variables:

```{r, asis=TRUE}
hrt_var_defs <- c("Last day the data was updated for a particular hospital",
"",
"",
"",
"Proportion of the seven-day average of occupied ICU beds to the seven-day average of available ICU beds.",
"",
"Proportion of the seven-day average of occupied hospital beds to the seven-day average of available hospital beds.",
"")
num_end_dates <- hosp_react_tab %>%
distinct(end_date) %>%
summarize(num_dates = n()) %>%
pull(num_dates)
hrt_var_defs <- purrr::reduce(list(
"Last day the data was updated for a particular hospital",
rep("", num_end_dates),
"Proportion of the seven-day average of occupied ICU beds to the seven-day average of available ICU beds.",
"",
"Proportion of the seven-day average of occupied hospital beds to the seven-day average of available hospital beds.",
""
), append)
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
Expand Down

0 comments on commit fe0142d

Please sign in to comment.