segcompare: Segments comparison of different homogeneous segmentations...

Description Usage Arguments Examples

View source: R/segcompare.R

Description

Segments comparison of different homogeneous segmentations methods.

Usage

1
2
3
4
5
6
segcompare(start = "SLK.start", end = "SLK.end", var = "deflection",
                  data, segid.matrix, methods = NULL)
## S3 method for class 'segcompare'
print(x, ...)
## S3 method for class 'segcompare'
plot(x, ...)

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 list of segmentation result.

segid.matrix

A matrix of segmentations.

methods

A vector of segmentation method names, default NULL.

x

A list of segments comparison result.

...

Ignore

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
testdata <- tsdwa[1:300, ]
testdata$length <- testdata$SLK.end - testdata$SLK.start
variable <- c("Curvature", "Deflection", "BLI")

seg1 <- hs(start = "SLK.start", end = "SLK.end", var = variable,
           testdata, method = "shs", range = c(0.1, 0.5)) # 0.3 s
seg2 <- hs(start = "SLK.start", end = "SLK.end", var = variable,
           testdata, method = "cda", range = c(0.1, 0.5)) # 0.7 s
seg3 <- hs(start = "SLK.start", end = "SLK.end", var = variable,
           testdata, method = "mcv", range = c(0.1, 0.5)) # 0.6 s
segid.matrix <- cbind(seg1$seg.id, seg2$seg.id, seg3$seg.id)

data(segid.matrix)
cp <- segcompare(start = "SLK.start", end = "SLK.end", var = variable,
                 testdata, segid.matrix, methods = c("SHS", "CDA", "MCV")) # 4.8 s
cp
plot(cp)

HS documentation built on Sept. 10, 2019, 9:03 a.m.

Related to segcompare in HS...