Nothing
# ==============================================================================
# PRINT METHODS FOR ALL S3 CLASSES
# ==============================================================================
# Rule used to choose the number of axes, as text (objects from 0.5.0 have
# no record of it and used the 80 % variance rule) (internal)
.rule_text <- function(x) {
r <- if (is.null(x$dim_retention)) "variance" else x$dim_retention
switch(r, msd = "mSD", variance = "80% variance", broken_stick = "broken stick", r)
}
#' @export
print.ascent_paired <- function(x, ...) {
cat("ASC-CFD Paired Analysis\n")
cat(sprintf(" Contrasts: %d | Dimensions: %d (rule: %s; %.1f%% var | Quality: %.1f%%)\n",
length(x$rDelta_C), x$k_retained, .rule_text(x), x$var_retained * 100, x$quality * 100))
if (!is.null(x$blocks)) cat(sprintf(" Blocks: %d (samples exchanged only within blocks in null model A)\n",
length(unique(x$blocks))))
cat(sprintf(" Null models: %s\n", if(!is.null(x$null_models)) "evaluated" else "not evaluated"))
cat("Use summary() for full results.\n")
invisible(x)
}
#' @export
print.ascent_pairwise <- function(x, ...) {
cat("ASC-CFD Pairwise Spatial Analysis\n")
cat(sprintf(" Communities: %d | Contrasts: %d | Dimensions: %d (rule: %s; %.1f%% var | Quality: %.1f%%)\n",
nrow(x$cwm_global), nrow(x$pairwise_results), x$k_retained, .rule_text(x),
x$var_retained * 100, x$quality * 100))
cat(sprintf(" Null models: %s\n", if(!is.null(x$null_models)) "evaluated" else "not evaluated"))
cat("Use summary() for full results.\n")
invisible(x)
}
#' @export
print.ascent_baseline <- function(x, ...) {
cat("ASC-CFD Baseline Functional Topology\n")
cat(sprintf(" Entities: %d | Dimensions: %d (rule: %s; %.1f%% var | Quality: %.1f%%)\n",
nrow(x$entities_results), x$k_retained, .rule_text(x), x$var_retained * 100, x$quality * 100))
cat("Use summary() for full results.\n")
invisible(x)
}
#' @export
print.ascent_entities <- function(x, ...) {
n_ent <- length(unique(x$entity_classification$Entity_ID))
n_spp <- nrow(x$entity_classification)
cat("ASC-CFD Functional Entities Classification\n")
cat(sprintf(" Species: %d | Entities: %d | Metric: %s | Method: %s\n",
n_spp, n_ent, x$metric, x$method))
if (!is.null(x$suggestions)) {
cat(sprintf(" Suggested k: silhouette %d (max %.2f), Mojena %d, gap %d\n",
x$suggestions[["silhouette"]], x$silhouette_max,
x$suggestions[["mojena"]], x$suggestions[["gap"]]))
}
cat("Use summary() for full results.\n")
invisible(x)
}
#' @export
print.ascent_transitions <- function(x, ...) {
cat("ASC-CFD Functional Leverage Analysis\n")
cat(sprintf(" Contrasts: %d\n", length(x)))
cat("Use summary() for detailed results.\n")
invisible(x)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.