R/print.R

Defines functions print.sbs print.wbs

Documented in print.sbs print.wbs

#' Print for a 'wbs' object
#'
#' @param x an object of class 'wbs'
#' @param ... further arguments passed to \code{print} method
#' @return NULL
#' @method print wbs
#' @export
#' @seealso \code{\link{wbs}}

print.wbs <- function(x,...){
	
	cat("Algorithm: ")
	if(x$integrated) cat("Wild Binary Segmentation integreated with standard BS\n")
	else  cat("Wild Binary Segmentation\n")
	
	cat(paste("Number of intervals M =",x$M,"\n"))
	cat("Type of intervals: ")
	if(x$rand.intervals) cat("random\n")
	else  cat("fixed\n")
	cat("Results: \n")
	print(x$res)
}



		
#' Print for an 'sbs' object
#'
#' @param x an object of class 'sbs'
#' @param ... further arguments passed to \code{print} method
#' @return NULL
#' @method print sbs
#' @export 
#' @seealso \code{\link{sbs}}
		
print.sbs <- function(x,...){
	
	cat("Algorithm: standard Binary Segmentation\n")
	cat("Results: \n")
	print(x$res)
}


		

Try the wbs package in your browser

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

wbs documentation built on May 30, 2017, 3:56 a.m.