Skip to content

Commit

Permalink
fix 'length > 1 in coercion to logical'
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMuir committed Apr 23, 2022
1 parent 491d86d commit 4336ee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/n_gram_merge.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ n_gram_merge <- function(vect, numgram = 2, ignore_strings = NULL,
edit_threshold <- NA
}
edit_threshold_missing <- is.na(edit_threshold)
if (!edit_threshold_missing && is.na(weight)) {
if (!edit_threshold_missing && any(is.na(weight))) {
stop("param 'weight' must not be NA if 'edit_threshold'is not NA",
call. = FALSE)
}
Expand Down

0 comments on commit 4336ee6

Please sign in to comment.