31
31
# ' This module generates the following objects, which can be modified in place using decorators::
32
32
# ' - `histogram_plot` (`ggplot2`)
33
33
# ' - `qq_plot` (`ggplot2`)
34
- # ' - `summary_table` (`listing_df ` created with [rlistings::as_listing ()])
35
- # ' - `test_table` (`listing_df ` created with [rlistings::as_listing ()])
34
+ # ' - `summary_table` (`datatables ` created with [DT::datatable ()])
35
+ # ' - `test_table` (`datatables ` created with [DT::datatable ()])
36
36
# '
37
37
# ' A Decorator is applied to the specific output using a named list of `teal_transform_module` objects.
38
38
# ' The name of this list corresponds to the name of the output to which the decorator is applied.
@@ -1271,9 +1271,9 @@ srv_distribution <- function(id,
1271
1271
# Summary table listing has to be created separately to allow for qenv join
1272
1272
output_summary_q <- reactive({
1273
1273
if (iv_r()$ is_valid()) {
1274
- within(common_q(), summary_table <- rlistings :: as_listing (summary_table_data ))
1274
+ within(common_q(), summary_table <- DT :: datatable (summary_table_data ))
1275
1275
} else {
1276
- within(common_q(), summary_table <- rlistings :: as_listing (summary_table_data [0L , ]))
1276
+ within(common_q(), summary_table <- DT :: datatable (summary_table_data [0L , ]))
1277
1277
}
1278
1278
})
1279
1279
@@ -1284,11 +1284,11 @@ srv_distribution <- function(id,
1284
1284
c(
1285
1285
common_q(),
1286
1286
within(test_q_out , {
1287
- test_table <- rlistings :: as_listing (test_table_data )
1287
+ test_table <- DT :: datatable (test_table_data )
1288
1288
})
1289
1289
)
1290
1290
} else {
1291
- within(common_q(), test_table <- rlistings :: as_listing (data.frame (missing = character (0L ))))
1291
+ within(common_q(), test_table <- DT :: datatable (data.frame (missing = character (0L ))))
1292
1292
}
1293
1293
})
1294
1294
@@ -1341,7 +1341,7 @@ srv_distribution <- function(id,
1341
1341
qq_r <- reactive(req(decorated_output_qq_q())[[" qq_plot" ]])
1342
1342
1343
1343
output $ summary_table <- DT :: renderDataTable(
1344
- expr = decorated_output_summary_q()[[" summary_table_data " ]],
1344
+ expr = decorated_output_summary_q()[[" summary_table " ]],
1345
1345
options = list (
1346
1346
autoWidth = TRUE ,
1347
1347
columnDefs = list (list (width = " 200px" , targets = " _all" ))
@@ -1353,11 +1353,7 @@ srv_distribution <- function(id,
1353
1353
req(iv_r()$ is_valid())
1354
1354
teal :: validate_inputs(iv_r_dist())
1355
1355
req(test_q()) # Ensure original errors are displayed
1356
- DT :: datatable(
1357
- data = decorated_output_test_q()[[" test_table_data" ]],
1358
- options = list (scrollX = TRUE ),
1359
- rownames = FALSE
1360
- )
1356
+ decorated_output_test_q()[[" test_table" ]]
1361
1357
})
1362
1358
1363
1359
pws1 <- teal.widgets :: plot_with_settings_srv(
0 commit comments