Skip to content
23 changes: 14 additions & 9 deletions R/tm_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
#' vars <- choices_selected(variable_choices(data[["ADSL"]], fact_vars_adsl))
#'
#'
#'
#' app <- init(
#' data = data,
#' modules = modules(
Expand Down Expand Up @@ -649,8 +648,8 @@
)
}

teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Summary Table")
qenv <- if (length(categorical_var) > 0) {
teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Summary Table")
qenv <- teal.code::eval_code(
qenv,
substitute(
Expand Down Expand Up @@ -740,16 +739,22 @@
categorical_var_name = as.name(categorical_var)
)
)
)
) |> within({

Check warning on line 742 in R/tm_outliers.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=R/tm_outliers.R,line=742,col=11,[pipe_continuation_linter] Put a space before `|>` and a new line after it, unless the full pipeline fits on one line.
table <- rtables::df_to_tt(summary_data)
table
})
} else {
within(qenv, summary_data <- data.frame())
warning("No categorical variable selected, summary table cannot be created")
within(qenv, {
table <- rtables::rtable(
header = "",
rtables::rrow("", "Null Report: No summary of observations available."),
inset = 2L
)
table
})
}

# Generate decoratable object from data
qenv <- within(qenv, {
table <- rtables::df_to_tt(summary_data)
table
})

if (length(categorical_var) > 0 && nrow(qenv[["ANL_OUTLIER"]]) > 0) {
shinyjs::show("order_by_outlier")
Expand Down
5 changes: 2 additions & 3 deletions man/tm_outliers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading