print.segmentr {segmentr} | R Documentation |
Prints a short description of the segments found in the segmentr
object
## S3 method for class 'segmentr'
print(x, ...)
x |
an object of type segmentr, containing change point information |
... |
further arguments to be passed down to other methods |
A short representation of the segments is printed on the screen, using the
start:end
range notation.
make_segment <- function(n, p) matrix(rbinom(100 * n, 1, p), nrow = 100)
data <- cbind(make_segment(5, 0.1), make_segment(10, 0.9), make_segment(2, 0.1))
mean_lik <- function(X) abs(mean(X) - 0.5) * ncol(X)^2
x <- segment(data, likelihood = mean_lik, algorithm = "hieralg")
print(x)