Skip to content

Commit

Permalink
export unexported documented functions
Browse files Browse the repository at this point in the history
  • Loading branch information
CorradoLanera committed May 13, 2024
1 parent 2a0279c commit c29739f
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 19 deletions.
Empty file added .Rprofile
Empty file.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: CrossClustering
Title: A Partial Clustering Algorithm
Version: 4.1.1
Version: 4.1.2
Date: 2024-05-01
Authors@R: c(
person("Paola", "Tellaroli", , "paola.tellaroli@gmail.com", role = c("cre", "aut")),
Expand All @@ -12,7 +12,7 @@ Authors@R: c(
person("Corrado", "Lanera", , "corrado.lanera@unipd.it", role = "aut")
)
Maintainer: Paola Tellaroli <paola.tellaroli@gmail.com>
Description: Provide the CrossClustering algorithm (Tellaroli et al.
Description: Provide the 'CrossClustering' algorithm (Tellaroli et al.
(2016) <doi:10.1371/journal.pone.0152333>), which is a partial
clustering algorithm that combines the Ward's minimum variance and
Complete Linkage algorithms, providing automatic estimation of a
Expand Down
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ S3method(print,crossclustering)
export(ari)
export(cc_crossclustering)
export(cc_get_cluster)
export(cc_test_ari)
export(cc_test_ari_permutation)
export(consensus_cluster)
export(is_zero)
export(prune_zero_tail)
export(reverse_table)
importFrom(stats,cutree)
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# CrossClustering 4.1.2

* exported `cc_test_ari`, `cc_test_ari_permutation`,
`consensus_cluster`, and `is_zero`

# CrossClustering 4.1.1

* Removed `.Random.seed` after CRAN request.
Expand Down
6 changes: 3 additions & 3 deletions R/cc_test_ari.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#' \item{nari}{nari}
#' \item{p-value}{the p-value of the test}
#'
#' @export
#'
#' @examples
#' library(CrossClustering)
#'
Expand All @@ -24,7 +26,7 @@
#' ground_truth <- iris[[5]] |>
#' as.numeric()
#'
#' CrossClustering:::cc_test_ari(ground_truth, clusters)
#' cc_test_ari(ground_truth, clusters)
#'
#' @author
#' Paola Tellaroli, <paola `dot` tellaroli `at` unipd `dot` it>;
Expand All @@ -37,8 +39,6 @@
#'
#' L. Hubert and p. Arabie (1985) Comparing partitions, Journal of
#' Classification, 2, 193-218.


cc_test_ari <- function(ground_truth, partition) {

checkmate::qassert(ground_truth, "N+")
Expand Down
5 changes: 3 additions & 2 deletions R/cc_test_ari_permutation.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#' \item{ari}{the adjusted Rand Index}
#' \item{p_value}{the p-value of the test}
#'
#' @export
#'
#' @examples
#' library(CrossClustering)
#'
Expand All @@ -21,7 +23,7 @@
#' ground_truth <- iris[[5]] |>
#' as.numeric()
#'
#' CrossClustering:::cc_test_ari_permutation(ground_truth, clusters)
#' cc_test_ari_permutation(ground_truth, clusters)
#'
#' @author
#' Paola Tellaroli, <paola `dot` tellaroli `at` unipd `dot` it>;
Expand All @@ -34,7 +36,6 @@
#'
#' L. Hubert and P. Arabie (1985) Comparing partitions, Journal of
#' Classification, 2, 193-218.

cc_test_ari_permutation <- function(ground_truth, partition) {

checkmate::qassert(ground_truth, "N+")
Expand Down
4 changes: 2 additions & 2 deletions R/consensus_cluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#' \item{a_star}{contingency table of the clustering};
#' \item{max_consensus}{maximum clustering consensus}.
#'
#' @export
#'
#' @examples
#' library(CrossClustering)
Expand All @@ -37,7 +38,7 @@
#'
#'
#' ### consensus_cluster
#' CrossClustering:::consensus_cluster(
#' consensus_cluster(
#' c(3, 4),
#' cluster_ward,
#' cluster_other
Expand All @@ -53,7 +54,6 @@
#' Cross-Clustering: A Partial Clustering Algorithm with Automatic
#' Estimation of the Number of Clusters. PLoS ONE 11(3): e0152333.
#' doi:10.1371/journal.pone.0152333

consensus_cluster <- function(k,
cluster_ward,
cluster_other
Expand Down
6 changes: 3 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ prune_zero_tail <- function(diag_mat) {
#' @param num a numerical vector of length one
#'
#' @return a boolean, TRUE if num is 0
#'
#' @export
#' @examples
#' CrossClustering:::is_zero(1)
#' CrossClustering:::is_zero(0)
#' is_zero(1)
#' is_zero(0)
is_zero <- function(num) {
# input check
checkmate::qassert(num, "N1")
Expand Down
4 changes: 3 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Remote (rhub)

* 19/20 [rhub checks](https://github.com/CorradoLanera/CrossClustering/actions/runs/8941514230) passed (all but the [windows on R devel](https://github.com/CorradoLanera/CrossClustering/actions/runs/8941514230/job/24563996554#step:5:5336) one, because of a [known](https://github.com/gagolews/stringi/issues/508) setup issue w/ `{stringi}`):
* 20/20 [rhub checks](https://github.com/CorradoLanera/CrossClustering/actions/runs/8941514230) passed:
- [VM] linux R-* (any version) ubuntu-latest on GitHub
- [VM] macos R-* (any version) macos-13 on GitHub
- [VM] macos-arm64 R-* (any version) macos-latest on GitHub
Expand Down Expand Up @@ -70,6 +70,8 @@ In this updated version I have:
* Switch from Travis and AppVeyor to GitHub-actions for CMD-checks, lint,
and coverage.
* removed `.Random.seed`, after request
* exported `cc_test_ari`, `cc_test_ari_permutation`,
`consensus_cluster`, and `is_zero`

> File 'R/CrossClustering-internal.R' sets .Random.seed.
> This is usually neither needed nor wanted.
Expand Down
2 changes: 1 addition & 1 deletion man/CrossClustering-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/cc_test_ari.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/cc_test_ari_permutation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/consensus_cluster.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/is_zero.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c29739f

Please sign in to comment.