splitlong: Split long segments to segments within length threshold.

Description Usage Arguments Examples

View source: R/splitlong.R

Description

Split long segments to segments within length threshold.

Usage

1
2
splitlong(var = "deflection", length = "length",
                 seg.id = "seg.id", data, range = NULL)

Arguments

var

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

length

A character of length name.

seg.id

A character of the name of new segment number.

data

A data frame of a dataset.

range

A vector of segment length threshold.

Examples

1
2
3
4
5
6
testdata <- tsdwa[1:1000,]
testdata$length <- round(testdata$SLK.end - testdata$SLK.start, digits = 10)
testdata <- cda(var = "Deflection", length = "length", testdata, range = c(0.1, 0.5))
testdata <- splitlong(var = "Deflection", length = "length",
                      seg.id = "seg.id", testdata, range = c(0.1, 0.5))
seglength.summary <- testdata[, .(sum(length)), by = .(seg.id)]

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

Related to splitlong in HS...