-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup gtcrosstabs #31
base: master
Are you sure you want to change the base?
Conversation
y = {{case}}, | ||
include = {{exposure}}, | ||
method.args = list(family = poisson, | ||
offset = log({{obstime}})), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chucking an error with {{obstime}} - cant figure out how to just feed all of this in to method.args clean - this would allow to specify up top and only need one call to gtsummary::tbl_uvregression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to self: create a temp var which is log ostime, then can just pass all as a char!
hey @zkamvar - can I bug you for a sec? They are all now in tbl_univariate_stratified_internal.R (realise now I should probably rename this for clarity)...
None of the documentation is up to scratch just yet (sorry) - and the code is still very repeaty ineffecienty.... linelist_cleaned <- tibble::tribble(
~DIED, ~fever_bin, ~age_group, ~obstime,
FALSE, FALSE, "45+", 4L,
TRUE, FALSE, "15-29", 12L,
TRUE, FALSE, "15-29", 20L,
TRUE, FALSE, "3-14", 16L,
FALSE, TRUE, "45+", 23L,
TRUE, FALSE, "30-44", 21L,
TRUE, TRUE, "15-29", 30L,
TRUE, TRUE, "45+", 30L,
FALSE, FALSE, "3-14", 13L,
FALSE, TRUE, "3-14", 27L,
TRUE, FALSE, "15-29", 6L,
FALSE, TRUE, "3-14", 19L,
FALSE, FALSE, "30-44", 10L,
FALSE, TRUE, "45+", 4L,
FALSE, TRUE, "45+", 18L,
FALSE, FALSE, "45+", 19L,
FALSE, TRUE, "45+", 21L,
FALSE, FALSE, "3-14", 27L,
FALSE, FALSE, "45+", 29L,
TRUE, FALSE, "30-44", 10L,
TRUE, TRUE, "15-29", 6L,
TRUE, FALSE, "30-44", 10L,
TRUE, FALSE, "15-29", 17L,
FALSE, FALSE, "15-29", 25L,
FALSE, TRUE, "45+", 25L,
TRUE, TRUE, "45+", 18L,
FALSE, TRUE, "15-29", 1L,
FALSE, TRUE, "15-29", 23L,
FALSE, FALSE, "45+", 8L,
FALSE, FALSE, "3-14", 28L,
FALSE, TRUE, "45+", 21L,
FALSE, FALSE, "15-29", 28L,
FALSE, TRUE, "0-2", 19L,
FALSE, TRUE, "45+", 11L,
FALSE, FALSE, "3-14", 25L,
FALSE, TRUE, "0-2", 26L,
FALSE, TRUE, "3-14", 15L,
FALSE, FALSE, "45+", 10L,
FALSE, TRUE, "3-14", 15L,
TRUE, FALSE, "15-29", 1L,
FALSE, TRUE, "15-29", 20L,
FALSE, TRUE, "15-29", 29L,
FALSE, TRUE, "3-14", 6L,
FALSE, TRUE, "30-44", 7L,
TRUE, FALSE, "30-44", 20L,
FALSE, FALSE, "45+", 21L,
FALSE, TRUE, "45+", 26L,
FALSE, TRUE, "30-44", 16L,
TRUE, FALSE, "30-44", 16L,
TRUE, TRUE, "3-14", 30L,
FALSE, FALSE, "15-29", 22L,
FALSE, FALSE, "15-29", 18L,
TRUE, FALSE, "45+", 14L,
TRUE, FALSE, "15-29", 25L,
TRUE, FALSE, "3-14", 9L,
FALSE, TRUE, "30-44", 15L,
FALSE, TRUE, "30-44", 8L,
FALSE, TRUE, "0-2", 1L,
TRUE, TRUE, "15-29", 20L,
FALSE, TRUE, "3-14", 8L,
FALSE, FALSE, "45+", 20L,
FALSE, TRUE, "15-29", 15L,
FALSE, TRUE, "30-44", 25L,
FALSE, FALSE, "15-29", 5L,
FALSE, FALSE, "3-14", 2L,
FALSE, FALSE, "0-2", 22L,
TRUE, FALSE, "3-14", 1L,
FALSE, FALSE, "45+", 3L,
FALSE, TRUE, "45+", 29L,
TRUE, TRUE, "45+", 12L,
TRUE, FALSE, "45+", 23L,
FALSE, FALSE, "15-29", 20L,
FALSE, TRUE, "45+", 3L,
FALSE, TRUE, "45+", 14L,
FALSE, TRUE, "15-29", 10L,
FALSE, FALSE, "45+", 16L,
FALSE, TRUE, "15-29", 3L,
TRUE, FALSE, "45+", 9L,
FALSE, TRUE, "45+", 5L,
FALSE, TRUE, "15-29", 10L,
FALSE, TRUE, "45+", 20L,
FALSE, FALSE, "15-29", 1L,
FALSE, FALSE, "30-44", 10L,
TRUE, TRUE, "15-29", 18L,
FALSE, TRUE, "15-29", 20L,
FALSE, FALSE, "0-2", 25L,
FALSE, FALSE, "45+", 14L,
FALSE, TRUE, "45+", 16L,
FALSE, FALSE, "3-14", 27L,
FALSE, FALSE, "45+", 15L,
TRUE, FALSE, "3-14", 25L,
TRUE, FALSE, "15-29", 1L,
TRUE, TRUE, "0-2", 2L,
FALSE, FALSE, "0-2", 19L,
FALSE, TRUE, "15-29", 15L,
FALSE, TRUE, "30-44", 18L,
FALSE, TRUE, "45+", 18L,
TRUE, TRUE, "45+", 16L,
FALSE, FALSE, "15-29", 18L,
FALSE, FALSE, "0-2", 6L,
FALSE, TRUE, "30-44", 12L,
FALSE, FALSE, "3-14", 29L,
FALSE, FALSE, "15-29", 1L,
FALSE, FALSE, "30-44", 16L,
FALSE, FALSE, "0-2", 30L,
TRUE, TRUE, "30-44", 23L,
TRUE, TRUE, "15-29", 12L,
TRUE, FALSE, "45+", 24L,
FALSE, FALSE, "45+", 7L,
FALSE, TRUE, "30-44", 28L,
TRUE, FALSE, "30-44", 9L,
FALSE, TRUE, "30-44", 8L,
FALSE, TRUE, "45+", 14L,
FALSE, FALSE, "45+", 25L,
FALSE, TRUE, "30-44", 9L,
TRUE, FALSE, "30-44", 26L,
FALSE, FALSE, "45+", 8L,
FALSE, FALSE, "15-29", 8L,
TRUE, FALSE, "45+", 18L,
TRUE, FALSE, "15-29", 8L,
FALSE, FALSE, "3-14", 23L,
TRUE, FALSE, "3-14", 19L,
FALSE, TRUE, "15-29", 1L,
FALSE, FALSE, "0-2", 17L,
FALSE, TRUE, "3-14", 2L,
FALSE, TRUE, "3-14", 18L,
FALSE, FALSE, "3-14", 8L,
FALSE, TRUE, "30-44", 19L,
TRUE, TRUE, "0-2", 6L,
FALSE, TRUE, "30-44", 13L,
TRUE, TRUE, "15-29", 16L,
FALSE, FALSE, "0-2", 25L,
FALSE, TRUE, "3-14", 28L,
TRUE, FALSE, "15-29", 12L,
FALSE, FALSE, "45+", 24L,
FALSE, FALSE, "3-14", 3L,
TRUE, FALSE, "45+", 5L,
FALSE, FALSE, "45+", 15L,
FALSE, FALSE, "45+", 3L,
FALSE, FALSE, "15-29", 20L,
FALSE, FALSE, "15-29", 23L,
FALSE, TRUE, "30-44", 1L,
TRUE, FALSE, "45+", 12L,
TRUE, TRUE, "15-29", 13L,
TRUE, TRUE, "3-14", 21L,
FALSE, FALSE, "45+", 22L,
TRUE, FALSE, "0-2", 23L,
TRUE, TRUE, "45+", 12L,
FALSE, TRUE, "15-29", 16L,
FALSE, TRUE, "3-14", 24L,
TRUE, FALSE, "30-44", 15L,
FALSE, TRUE, "15-29", 4L,
TRUE, TRUE, "45+", 11L,
FALSE, TRUE, "15-29", 16L,
FALSE, TRUE, "45+", 6L,
FALSE, TRUE, "15-29", 17L,
FALSE, TRUE, "45+", 10L,
FALSE, FALSE, "45+", 11L,
FALSE, FALSE, "30-44", 6L,
TRUE, TRUE, "30-44", 7L,
TRUE, FALSE, "45+", 8L,
TRUE, FALSE, "30-44", 29L,
FALSE, FALSE, "45+", 29L,
TRUE, TRUE, "45+", 22L,
TRUE, FALSE, "0-2", 18L,
TRUE, TRUE, "45+", 2L,
FALSE, TRUE, "30-44", 12L,
FALSE, FALSE, "45+", 17L,
FALSE, TRUE, "45+", 25L,
FALSE, FALSE, "15-29", 5L,
FALSE, TRUE, "3-14", 25L,
FALSE, TRUE, "30-44", 29L,
FALSE, TRUE, "30-44", 27L,
FALSE, TRUE, "3-14", 27L,
FALSE, FALSE, "45+", 12L,
TRUE, TRUE, "45+", 1L,
TRUE, TRUE, "3-14", 30L,
FALSE, TRUE, "15-29", 25L,
FALSE, FALSE, "3-14", 11L,
TRUE, FALSE, "15-29", 13L,
FALSE, TRUE, "45+", 24L,
FALSE, FALSE, "15-29", 5L,
FALSE, TRUE, "3-14", 24L,
FALSE, FALSE, "30-44", 8L,
FALSE, FALSE, "3-14", 11L,
FALSE, TRUE, "15-29", 17L,
FALSE, FALSE, "15-29", 17L,
TRUE, TRUE, "30-44", 11L,
FALSE, FALSE, "45+", 20L,
FALSE, TRUE, "0-2", 11L,
TRUE, TRUE, "3-14", 9L,
FALSE, TRUE, "0-2", 7L,
TRUE, TRUE, "45+", 7L,
TRUE, FALSE, "45+", 19L,
TRUE, FALSE, "30-44", 25L,
FALSE, FALSE, "15-29", 3L,
FALSE, FALSE, "3-14", 24L,
FALSE, TRUE, "45+", 29L,
FALSE, FALSE, "15-29", 29L,
TRUE, FALSE, "30-44", 13L,
FALSE, FALSE, "3-14", 15L,
FALSE, FALSE, "15-29", 7L,
TRUE, TRUE, "45+", 23L,
TRUE, TRUE, "3-14", 1L,
FALSE, FALSE, "0-2", 27L,
TRUE, FALSE, "0-2", 20L,
FALSE, TRUE, "15-29", 22L,
TRUE, TRUE, "45+", 7L,
FALSE, TRUE, "30-44", 15L,
FALSE, FALSE, "0-2", 15L,
FALSE, FALSE, "15-29", 29L,
TRUE, FALSE, "45+", 21L,
FALSE, TRUE, "3-14", 1L
)
el_tablo <- tbl_cmh_internal(linelist_cleaned,
DIED,
fever_bin,
age_group,
measure = "OR")
add_crosstabs(el_tablo) |
starting a new function for adding cross tabulations to a gtsummary tbl_uvregression