Deparse an expression and display the code following NEST conventions.
Examples
expr <- quote(
rtables::basic_table() %>%
rtables::split_cols_by(var = "ARMCD") %>%
test_proportion_diff(
vars = "rsp", method = "cmh", variables = list(strata = "strat")
) %>%
rtables::build_table(df = dta)
)
teal.modules.clinical:::styled_expr(expr)
#> Warning: Could not use colored = TRUE, as the package prettycode is not installed. Please install it if you want to see colored output or see `?print.vertical` for more information.
#> rtables::basic_table() %>%
#> rtables::split_cols_by(var = "ARMCD") %>%
#> test_proportion_diff(vars = "rsp", method = "cmh", variables = list(strata = "strat")) %>%
#> rtables::build_table(df = dta)