R/print.yaConsensus.R

Defines functions print.yaConsensus

print.yaConsensus <-
function(x, verbose = T, ...) {
    results <- list('consensus type:' = ifelse(x$bySample, " sampling of samples", " sampling of features"),
                    'number of items: ' = length(x$labels),
                    'sampling rate: ' = paste0(round(100*x$epsilon, 2), "%"),
                    'number of samplings: ' = x$runs,
                    'inner distance: ' = x$distMethod,
                    'inner hc method: ' = x$hcMethod,
                    'outer distance: ' = "consensus",
                    'outer hc method: ' = "complete",
                    'running time (seconds): ' = round(x$elapsed_time, 4),
                    'number of cores: ' = x$ncores)
    if(verbose) {
      message("yaConsensus statistics")
      for(k in 1:length(results)) message("\t", names(results)[k], results[[k]])
    }
    invisible(results)
  }

Try the yaConsensus package in your browser

Any scripts or data that you put into this service are public.

yaConsensus documentation built on April 3, 2025, 10:12 p.m.