Skip to content

Commit

Permalink
fix: make sure to pass a data.frame into teal::validate_has_data
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Nov 16, 2023
1 parent eef36c1 commit f8471a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/tm_g_scatterplotmatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ srv_g_scatterplotmatrix <- function(id, data, reporter, filter_panel_api, variab
}

teal::validate_has_data(ANL, 10)
teal::validate_has_data(ANL[, cols_names], 10, complete = TRUE, allow_inf = FALSE)
teal::validate_has_data(ANL[, cols_names, drop = FALSE], 10, complete = TRUE, allow_inf = FALSE)

# get labels and proper variable names
varnames <- varname_w_label(cols_names, ANL, wrap_width = 20) # nolint
Expand Down
2 changes: 1 addition & 1 deletion R/tm_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var,
`if`(
length(categorical_var) == 0,
ANL,
ANL[, names(ANL) != categorical_var]
ANL[, names(ANL) != categorical_var, drop = FALSE]
),
min_nrow = 10,
complete = TRUE,
Expand Down

0 comments on commit f8471a8

Please sign in to comment.