hsctg {HS}R Documentation

Homogeneous segmentation function with both categorical and continous variables.

Description

Homogeneous segmentation function with both categorical and continous variables.

Usage

hsctg(start = "SLK.start", end = "SLK.end", var = "deflection",
             data, method = "shs", range = NULL, by.ctg = NULL)

Arguments

start

A character of start location name of a spatial line.

end

A character of end location name of a spatial line.

var

A character or a character vector of variable names, such as a road pavement performance indicator.

data

A data frame of a dataset.

method

A character of homogeneous segmentation method. Available methods include "shs", "cda" and "mcv".

range

A vector of segment length threshold.

by.ctg

A vector of categorical variable names.

Examples

testdata <- tsdwa[1:300,]
hc1 <- hsctg(start = "SLK.start", end = "SLK.end", var = c("Curvature", "Deflection", "BLI"),
          testdata, method = "shs", range = c(0.1, 0.5), by.ctg = c("SurfType", "PvtType"))


[Package HS version 1.1 Index]