Skip to content

Commit

Permalink
fix: test suite now reflects autocol selection
Browse files Browse the repository at this point in the history
  • Loading branch information
selkamand committed Jan 23, 2025
1 parent 980a03e commit a37c954
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/gg1d.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ gg1d <- function(
cli::cli_alert_warning("Autoplotting > {max_plottable_cols} fields by `gg1d` is not recommended (visualisation ends up very squished). Chossing the {max_plottable_cols}/{n_plottable_cols} plottable columns which maximise mutual information with `{col_sort}`. To show all plottable columns, set {.code limit_plots = FALSE}. Alternatively, manually choose which columns are plotted by setting `cols_to_plot`")
}
else {
optimal_axis_order <- get_optimal_axis_order(data = df_plottable_data, metric = "mutinfo")
optimal_axis_order <- get_optimal_axis_order(data = df_plottable_data, metric = "mutinfo", verbose = FALSE)
# Only consider the first {max_plottable_cols} columns plottable.
plottable_cols <- optimal_axis_order[seq_len(max_plottable_cols)]
col_sort <- plottable_cols[1]
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-gg1d.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ test_that("gg1d limits the number of plottable columns", {
for (i in 1:20) {
data[[paste0("Col", i)]] <- rnorm(10)
}
expect_error(
expect_message(
gg1d(data = data, max_plottable_cols = 10, verbose = FALSE),
"Autoplotting > 10 fields by `gg1d` is not recommended"
)
Expand Down

0 comments on commit a37c954

Please sign in to comment.