diff --git a/DESCRIPTION b/DESCRIPTION index 9a2c0ec6..e676913a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: tidyclust Title: A Common API to Clustering -Version: 0.2.2.9000 +Version: 0.2.3.9000 Authors@R: c( person("Emil", "Hvitfeldt", , "emil.hvitfeldt@posit.co", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-0679-1945")), @@ -54,4 +54,4 @@ Config/Needs/website: pkgdown, tidymodels, tidyverse, palmerpenguins, Config/testthat/edition: 3 Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.2 diff --git a/NAMESPACE b/NAMESPACE index 414d2fd1..9960b437 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,6 +2,9 @@ S3method(as_tibble,cluster_metric_set) S3method(augment,cluster_fit) +S3method(check_args,default) +S3method(check_args,hier_clust) +S3method(check_args,k_means) S3method(extract_cluster_assignment,KMeansCluster) S3method(extract_cluster_assignment,cluster_fit) S3method(extract_cluster_assignment,cluster_spec) @@ -24,6 +27,7 @@ S3method(fit,cluster_spec) S3method(fit_xy,cluster_spec) S3method(glance,cluster_fit) S3method(load_pkgs,cluster_spec) +S3method(merge,cluster_spec) S3method(min_grid,cluster_spec) S3method(predict,cluster_fit) S3method(predict,cluster_spec) @@ -35,6 +39,8 @@ S3method(print,cluster_spec) S3method(print,control_cluster) S3method(print,hier_clust) S3method(print,k_means) +S3method(required_pkgs,cluster_fit) +S3method(required_pkgs,cluster_spec) S3method(set_args,cluster_spec) S3method(set_engine,cluster_spec) S3method(set_mode,cluster_spec) diff --git a/NEWS.md b/NEWS.md index 7eb9c91f..190f4f63 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # tidyclust (development version) +# tidyclust 0.2.3 + * Update to fix revdep issue for clustMixType. (#190) # tidyclust 0.2.2 diff --git a/R/hier_clust.R b/R/hier_clust.R index 0fe09b04..1d5e898c 100644 --- a/R/hier_clust.R +++ b/R/hier_clust.R @@ -145,6 +145,7 @@ update.hier_clust <- function(object, # # ---------------------------------------------------------------------------- +#' @export check_args.hier_clust <- function(object) { args <- lapply(object$args, rlang::eval_tidy) diff --git a/R/k_means.R b/R/k_means.R index 7dcc6e2d..3595827b 100644 --- a/R/k_means.R +++ b/R/k_means.R @@ -126,6 +126,7 @@ update.k_means <- function(object, # ------------------------------------------------------------------------------ +#' @export check_args.k_means <- function(object) { args <- lapply(object$args, rlang::eval_tidy) diff --git a/R/misc.R b/R/misc.R index a2f0bb50..a79caffc 100644 --- a/R/misc.R +++ b/R/misc.R @@ -4,6 +4,7 @@ check_args <- function(object) { UseMethod("check_args") } +#' @export check_args.default <- function(object) { invisible(object) } diff --git a/R/required_pkgs.R b/R/required_pkgs.R index 133d7b09..c87309fd 100644 --- a/R/required_pkgs.R +++ b/R/required_pkgs.R @@ -1,5 +1,5 @@ # https://github.com/tidymodels/parsnip/blob/main/R/required_pkgs.R - +#' @export required_pkgs.cluster_spec <- function(x, infra = TRUE, ...) { if (is.null(x$engine)) { rlang::abort("Please set an engine.") @@ -7,6 +7,7 @@ required_pkgs.cluster_spec <- function(x, infra = TRUE, ...) { get_pkgs(x, infra) } +#' @export required_pkgs.cluster_fit <- function(x, infra = TRUE, ...) { get_pkgs(x$spec, infra) } diff --git a/R/tune_helpers.R b/R/tune_helpers.R index 68e43d3f..86597404 100644 --- a/R/tune_helpers.R +++ b/R/tune_helpers.R @@ -302,6 +302,7 @@ finalize_workflow_spec <- function(workflow, grid_model) { workflow } +#' @export merge.cluster_spec <- function(x, y, ...) { merger(x, y, ...) } diff --git a/README.md b/README.md index 110b80f8..3599ea81 100644 --- a/README.md +++ b/README.md @@ -160,18 +160,18 @@ This project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. -- For questions and discussions about tidymodels packages, modeling, - and machine learning, please [post on RStudio - Community](https://forum.posit.co/new-topic?category_id=15&tags=tidymodels,question). +- For questions and discussions about tidymodels packages, modeling, and + machine learning, please [post on RStudio + Community](https://forum.posit.co/new-topic?category_id=15&tags=tidymodels,question). -- If you think you have encountered a bug, please [submit an - issue](https://github.com/tidymodels/tidyclust/issues). +- If you think you have encountered a bug, please [submit an + issue](https://github.com/tidymodels/tidyclust/issues). -- Either way, learn how to create and share a - [reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html) - (a minimal, reproducible example), to clearly communicate about your - code. +- Either way, learn how to create and share a + [reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html) + (a minimal, reproducible example), to clearly communicate about your + code. -- Check out further details on [contributing guidelines for tidymodels - packages](https://www.tidymodels.org/contribute/) and [how to get - help](https://www.tidymodels.org/help/). Footer +- Check out further details on [contributing guidelines for tidymodels + packages](https://www.tidymodels.org/contribute/) and [how to get + help](https://www.tidymodels.org/help/). Footer diff --git a/cran-comments.md b/cran-comments.md index 03c412d2..09659456 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,6 @@ ## Comments -update in testing to allow ClusterR easy release. +update in testing to fix bugs resultign from clustMixType release. ## R CMD check results diff --git a/man/cut_height.Rd b/man/cut_height.Rd index 63729d57..d29fab50 100644 --- a/man/cut_height.Rd +++ b/man/cut_height.Rd @@ -12,7 +12,7 @@ largest possible values, respectively. If a transformation is specified, these values should be in the \emph{transformed units}.} \item{trans}{A \code{trans} object from the \code{scales} package, such as -\code{scales::log10_trans()} or \code{scales::reciprocal_trans()}. If not provided, +\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided, the default is used which matches the units used in \code{range}. If no transformation, \code{NULL}.} } diff --git a/man/dot-k_means_fit_clustMixType.Rd b/man/dot-k_means_fit_clustMixType.Rd index 10cfaa4c..85067a94 100644 --- a/man/dot-k_means_fit_clustMixType.Rd +++ b/man/dot-k_means_fit_clustMixType.Rd @@ -7,9 +7,10 @@ .k_means_fit_clustMixType(x, k, ...) } \arguments{ -\item{x}{Data frame with both numerics and factors.} +\item{x}{Data frame with both numerics and factors (also ordered factors are possible).} -\item{k}{Either the number of clusters, a vector specifying indices of initial prototypes, or a data frame of prototypes of the same columns as \code{x}.} +\item{k}{Either the number of clusters, a vector specifying indices of initial prototypes, or a data frame of +prototypes of the same columns as \code{x}.} \item{...}{Other arguments passed to \code{clustMixType::kproto()}} } diff --git a/revdep/README.md b/revdep/README.md index a54f718a..c1820a2b 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -10,14 +10,17 @@ |collate |en_US.UTF-8 | |ctype |en_US.UTF-8 | |tz |America/Los_Angeles | -|date |2024-06-17 | +|date |2024-07-02 | |pandoc |3.1.12.3 @ /Applications/Positron.app/Contents/Resources/app/bin/pandoc/ (via rmarkdown) | # Dependencies |package |old |new |Δ | |:---------|:-----|:----------|:--| -|tidyclust |0.2.1 |0.2.1.9000 |* | +|tidyclust |0.2.2 |0.2.2.9000 |* | +|cli |NA |3.6.3 |* | +|digest |NA |0.6.36 |* | +|lhs |NA |1.2.0 |* | # Revdeps