This change is especially needed as the old errors refers to k and h as arguments, but they don't work in {tidyclust}.
Current:
library(tidyclust)
hclust_spec <- hier_clust()
hclust_fit <- fit(hclust_spec, ~., mtcars)
hclust_fit %>%
extract_cluster_assignment()
#> Error in stats::cutree(object, k = num_clusters, h = cut_height): either 'k' or 'h' must be specified
This PR:
library(tidyclust)
hclust_spec <- hier_clust()
hclust_fit <- fit(hclust_spec, ~., mtcars)
hclust_fit %>%
extract_cluster_assignment()
#> Error in `extract_cluster_assignment()`:
#> ! Please specify either `num_clusters` or `cut_height`.
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
To close https://github.com/tidymodels/tidyclust/issues/98
This change is especially needed as the old errors refers to
k
andh
as arguments, but they don't work in {tidyclust}.Current:
This PR: