segmentation class description

print.segmentation prints object of segmentation class

plot.segmentation plot object of segmentation class - wrapper for plot_segm

likelihood.segmentation deprecated function for plotting likelihood estimates of segmentation object. Now use plot_likelihood.

plot_likelihood plot likelihood estimates of a segmentation object - works only for picard segmentation.

get_likelihood returns likelihood estimates of a segmentation object. Deprecated, now use logLik.segmentation.

logLik.segmentation returns log-likelihood estimates of a segmentation object

plot_BIC plot BIC estimates of a segmentation object - works only for segclust algorithm.

BIC returns BIC-based penalized log-likelihood estimates of a segmentation object when segmentation/clustering has been run.

stateplot plot state distribution of a segmentation object

states return data.frame with states statistics a segmentation object

segment return data.frame with segment information of a segmentation object

augment.segmentation return data.frame with original data and state information of a segmentation object

segmap create maps with object of segmentation class (interpreting latitude/longitude)

# S3 method for segmentation
print(x, max.level = 1, ...)

# S3 method for segmentation
plot(x, nseg, ncluster, interactive = FALSE, xcol = "indice", order, ...)

# S3 method for segmentation
likelihood(x, ...)

plot_likelihood(x)

get_likelihood(x)

# S3 method for segmentation
logLik(object, ...)

plot_BIC(x)

# S3 method for segmentation
BIC(object, ...)

stateplot(x, nseg, ncluster, order)

states(x, nseg, ncluster)

segment(x, nseg, ncluster)

# S3 method for segmentation
augment(x, nseg, ncluster, colname_state = "state", ...)

segmap(
  x,
  interactive = FALSE,
  nseg,
  ncluster,
  html = FALSE,
  scale = 1,
  width = 400,
  height = 400,
  order,
  pointsize = 1,
  linesize = 0.5,
  ...
)

Arguments

x

a segmentation object generated by segmentation

max.level

argument to be passed to utils::str()

...

additional arguments

nseg

number of segment chosen

ncluster

number of classes chosen

interactive

whether plot are interactive (dygraphs/leaflet) or not (ggplot2)

xcol

column for x axis. can be POSIXct

order

should cluster be ordered

object

a segmentation-class object, created by segclust.

colname_state

column name for the added state column

html

whether htmltools::tagList should be applied on the returned object object for integrating in html pages

scale

for dividing coordinates to have compatibility with leaflet

width

width

height

height

pointsize

size of points

linesize

size of lines

Examples

if (FALSE) {
plot(res.segclust)
plot(res.segclust, nseg = 10, ncluster = 3)
}

if (FALSE) {
plot_likelihood(res.seg)
}

if (FALSE) {
logLik(res.seg)
}

if (FALSE) {
plot_BIC(res.segclust)
}

if (FALSE) {
plot_BIC(res.segclust)
}

if (FALSE) {
stateplot(res.segclust)
stateplot(res.seg)
}
if (FALSE) {
states(res.segclust)
states(res.seg)
}

if (FALSE) {
segment(res.segclust)
segment(res.segclust, ncluster = 3, nseg = 30)
segment(res.seg)
segment(res.seg, nseg = 4)
}
if (FALSE) {
augment(res.segclust)
augment(res.segclust, ncluster = 3, nseg = 30)
augment(res.seg)
augment(res.seg, nseg = 4)
}
if (FALSE) {
segmap(res.segclust, coord.names = c("x", "y"))
segmap(res.segclust, ncluster = 3, nseg = 30)
segmap(res.seg)
segmap(res.seg, nseg = 4)
}