* using log directory 'd:/RCompile/CRANincoming/R-devel/bootcluster.Rcheck' * using R Under development (unstable) (2024-11-07 r87302 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.3.0 GNU Fortran (GCC) 13.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'bootcluster/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'bootcluster' version '0.4.0' * package encoding: UTF-8 * checking CRAN incoming feasibility ... [10s] NOTE Maintainer: 'Tianmou Liu ' New maintainer: Tianmou Liu Old maintainer(s): Tianmou Liu Possibly misspelled words in DESCRIPTION: Liu (28:22) Package has a VignetteBuilder field but no prebuilt vignette index. * checking package namespace information ... OK * checking package dependencies ... INFO Vignette dependency required without any vignettes: 'knitr' * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'bootcluster' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... NOTE Mismatches for apparent methods not registered: min: function(..., na.rm) min.agreement: function(clst, agrmt) See section 'Registering S3 methods' in the 'Writing R Extensions' manual. * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [17s] NOTE calculate_smin_delta: no visible global function definition for 'esmbl.stability' create_consensus_graph: no visible global function definition for 'graph_from_incidence_matrix' create_consensus_graph: no visible global function definition for 'set_graph_attr' ensemble_clustering: no visible global function definition for 'cluster_fast_greedy' ensemble_clustering: no visible global function definition for 'E' extract_clustering: no visible global function definition for 'membership' plot_clustering_results: no visible global function definition for 'prcomp' plot_clustering_results: no visible binding for global variable 'PC1' plot_clustering_results: no visible binding for global variable 'PC2' plot_clustering_results: no visible binding for global variable 'kmeans' plot_clustering_results: no visible binding for global variable 'hierarchical' plot_clustering_results: no visible binding for global variable 'spectral' plot_clustering_results: no visible binding for global variable 'ensemble' plot_clustering_results: no visible binding for global variable 'kmeans_stability' plot_clustering_results: no visible binding for global variable 'hierarchical_stability' plot_clustering_results: no visible binding for global variable 'spectral_stability' plot_clustering_results: no visible global function definition for 'E' plot_smin_analysis: no visible binding for global variable 'Method' plot_smin_analysis: no visible binding for global variable 'Value' plot_smin_analysis: no visible binding for global variable 'Type' ref_dist: no visible global function definition for 'rnorm' Undefined global functions or variables: E Method PC1 PC2 Type Value cluster_fast_greedy ensemble esmbl.stability graph_from_incidence_matrix hierarchical hierarchical_stability kmeans kmeans_stability membership prcomp rnorm set_graph_attr spectral spectral_stability Consider adding importFrom("stats", "kmeans", "prcomp", "rnorm") to your NAMESPACE file. * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... ERROR Running 'test_ensemble.R' Running the tests in 'tests/test_ensemble.R' failed. Complete output: > # Test script for ensemble clustering functionality > > library(bootcluster) > > # Generate test data > set.seed(123) > n <- 150 # number of points > centers <- matrix(c(0,0, 2,2, -2,2), ncol=2, byrow=TRUE) > clusters <- sample(1:3, n, replace=TRUE) > x <- matrix(0, nrow=n, ncol=2) > for(i in 1:n) { + x[i,] <- centers[clusters[i],] + rnorm(2, 0, 0.3) + } > > # Test ensemble clustering with different k values > test_ensemble <- function() { + # Test case 1: Equal k values + res1 <- ensemble_clustering(x, k_km=3, k_hc=3, k_sc=3) + cat("Test 1 - Equal k values:\n") + cat("Number of clusters found:", length(unique(res1$membership)), "\n") + cat("Modularity:", res1$modularity, "\n\n") + + # Test case 2: Different k values + res2 <- ensemble_clustering(x, k_km=3, k_hc=4, k_sc=2) + cat("Test 2 - Different k values:\n") + cat("Number of clusters found:", length(unique(res2$membership)), "\n") + cat("Modularity:", res2$modularity, "\n\n") + + # Test visualization + plots <- plot_clustering_results(x, res1, pca=FALSE) + print(plots$ensemble) + + # Test Smin analysis + smin_plot <- plot_smin_analysis(res1) + print(smin_plot) + } > > # Run tests > test_ensemble() Error in ensemble_clustering(x, k_km = 3, k_hc = 3, k_sc = 3) : could not find function "ensemble_clustering" Calls: test_ensemble Execution halted * checking PDF version of manual ... [23s] OK * checking HTML version of manual ... OK * DONE Status: 1 ERROR, 3 NOTEs