-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
IIUC, when multiple columns of cluster_codes could match the levels of cluster_id, the first one is selected silently.
Lines 140 to 151 in f3e294e
| if (is.null(k)) { | |
| kids <- levels(y$cluster_id) | |
| same <- vapply(cluster_codes(x), function(u) | |
| identical(levels(u), kids), logical(1)) | |
| if (!any(same)) | |
| stop("Couldn't match any clustering", | |
| " in input data 'x' with results in 'y'.") | |
| k <- names(cluster_codes(x))[same][1] | |
| } else { | |
| k <- .check_k(x, k) | |
| } | |
| x$cluster_id <- cluster_ids(x, k) |
IMO, if sum(same) > 1 a warning must be raised show the selected column/clustering, or, an error must be raised to force the user to select the clustering column (k argument).
Metadata
Metadata
Assignees
Labels
No labels