Skip to content

Commit

Permalink
use str_collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
advieser committed Sep 23, 2024
1 parent bcc6dfd commit cd9609e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/PipeOpSmote.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ PipeOpSmote = R6Class("PipeOpSmote",
cols = task$feature_names
unsupported_cols = setdiff(unlist(task$col_roles), union(cols, task$target_names))
if (length(unsupported_cols)) {
stopf("SMOTE cannot generate synthetic data for the following columns since they are neither features nor targets: '%s'",
paste(unsupported_cols, collapse = "', '"))
stopf("SMOTE cannot generate synthetic data for the following columns since they are neither features nor targets: %s.",
str_collapse(unsupported_cols, quote = '"'))
}
if (!length(cols)) {
return(task)
Expand Down

0 comments on commit cd9609e

Please sign in to comment.