zeroSpeeds: deals with zero speeds

Description Usage Arguments Value Note See Also Examples

Description

one way to deal with zero speeds so it helps in the calculation of traffic densities macroMIDAS. The method is to replace all zero speeds by NA values and so traffic density values would be NA as well.

Usage

1
2
##replace zeros with NA
replaceZeroNaMIDAS(x, speed.lane = "Speed.Lane")

Arguments

x

object of class 'midas' with speed column(s)

speed.lane

character. part of names of the speed columns which distinguish them from other columns. Default to "Speed.Lane"

Value

midas object with updated speed data of the traffic.data element (zeros replaced by NA's)

Note

not sure if this is the right way to do it for some entries, zero speed does not make sense, more like a measurement fault

See Also

macroMIDAS

Examples

1
2
3
4
5
6
## Not run: 
#md is a one .csv data set you've downloaded
ex <- replaceZeroNaMIDAS(x = md)
#comment(ex) #provides the number of rows where zero speeds are found and replaced by NA

## End(Not run)

arwasayegh/mdep documentation built on May 20, 2019, 1:27 p.m.