#' Print a table of the selected sites.
#'
#' @param x Swarmtools object
#' @param ... not currently in use but should be soon
#'
#' @export
print.swarmtools <- function(x, ...) {
dots <- list(...)
if (class(x) != "swarmtools")
stop("ERROR: Please pass a swarmtools object to print.swarmtools()")
if (length(x$tf_loss_cutoff) > 1) {
cat(paste(summary(x), collapse='\n'))
} else {
# if tf_loss_cutoff is a vector:
cat(paste0("Loss cutoff = ", x$tf_loss_cutoff, "%.\n"))
cat(paste0("Selected ", nrow(x$selected_sites), " sites:\n"))
print(x$selected_sites, quote=F)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.