Skip to content

Commit 87945c3

Browse files
committed
chore: cleanup unused report element
1 parent da07b9f commit 87945c3

File tree

2 files changed

+20
-30
lines changed

2 files changed

+20
-30
lines changed

R/tm_g_distribution.R

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,28 +1345,21 @@ srv_distribution <- function(id,
13451345
summary_r <- reactive({
13461346
q <- req(output_summary_q())
13471347

1348-
list(
1349-
html = DT::datatable(
1350-
q[["summary_table_data"]],
1351-
options = list(
1352-
autoWidth = TRUE,
1353-
columnDefs = list(list(width = "200px", targets = "_all"))
1354-
),
1355-
rownames = FALSE
1348+
DT::datatable(
1349+
q[["summary_table_data"]],
1350+
options = list(
1351+
autoWidth = TRUE,
1352+
columnDefs = list(list(width = "200px", targets = "_all"))
13561353
),
1357-
report = q[["summary_table"]]
1354+
rownames = FALSE
13581355
)
13591356
})
13601357

13611358
output$summary_table <- DT::renderDataTable(summary_r()[["html"]])
13621359

13631360
tests_r <- reactive({
13641361
q <- req(output_test_q())
1365-
1366-
list(
1367-
html = DT::datatable(q[["test_table_data"]]),
1368-
report = q[["test_table"]]
1369-
)
1362+
DT::datatable(q[["test_table_data"]])
13701363
})
13711364

13721365
pws1 <- teal.widgets::plot_with_settings_srv(

R/tm_missing_data.R

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,22 +1327,19 @@ srv_missing_data <- function(id,
13271327
summary_table_r <- reactive({
13281328
q <- req(decorated_summary_table_q())
13291329

1330-
list(
1331-
html = if (length(input$variables_select) == 0) {
1332-
# so that zeroRecords message gets printed
1333-
# using tibble as it supports weird column names, such as " "
1334-
DT::datatable(
1335-
tibble::tibble(` ` = logical(0)),
1336-
options = list(
1337-
language = list(zeroRecords = "No variable selected."),
1338-
pageLength = input$levels_table_rows
1339-
)
1330+
if (length(input$variables_select) == 0) {
1331+
# so that zeroRecords message gets printed
1332+
# using tibble as it supports weird column names, such as " "
1333+
DT::datatable(
1334+
tibble::tibble(` ` = logical(0)),
1335+
options = list(
1336+
language = list(zeroRecords = "No variable selected."),
1337+
pageLength = input$levels_table_rows
13401338
)
1341-
} else {
1342-
DT::datatable(q[["summary_data"]])
1343-
},
1344-
report = q[["table"]]
1345-
)
1339+
)
1340+
} else {
1341+
DT::datatable(q[["summary_data"]])
1342+
}
13461343
})
13471344

13481345
by_subject_plot_r <- reactive({
@@ -1364,7 +1361,7 @@ srv_missing_data <- function(id,
13641361
width = plot_width
13651362
)
13661363

1367-
output$levels_table <- DT::renderDataTable(summary_table_r()[["html"]])
1364+
output$levels_table <- DT::renderDataTable(summary_table_r())
13681365

13691366
pws3 <- teal.widgets::plot_with_settings_srv(
13701367
id = "by_subject_plot",

0 commit comments

Comments
 (0)