print.segmentr {segmentr} | R Documentation |
Print a segmentr object
Description
Prints a short description of the segments found in the segmentr
object
Usage
## S3 method for class 'segmentr'
print(x, ...)
Arguments
x |
an object of type segmentr, containing change point information |
... |
further arguments to be passed down to other methods |
Details
A short representation of the segments is printed on the screen, using the
start:end
range notation.
Examples
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)
[Package segmentr version 0.2.0 Index]