segsmooth: Smoothing data using the moving average method for the...

Description Usage Arguments Examples

View source: R/segsmooth.R

Description

A center aligned moving window is used for the moving average method.

Usage

1
segsmooth(var = "deflection", range = 11, data)

Arguments

var

A character of the name of a variable in a dataset, such as a road pavement performance indicator.

range

A number of the size of moving window. An odd number is required.

data

A data frame of monitoring data.

Examples

1
2
3
4
5
6
7
8
9
# preprocessing
testdata <- tsdwa[1:500,]
testdata <- preprocessing(var = "Deflection", location = "SLK.start", data = testdata)
# smoothing
testdata <- segsmooth(var = "Deflection", range = 11, data = testdata)
# plot
plot(testdata$SLK.start, testdata$Deflection, type = "l",
     col = "lightblue", xlab = "location", ylab = "deflection")
lines(testdata$SLK.start, testdata$smooth.Deflection)

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

Related to segsmooth in HS...