Description Usage Arguments Value See Also Examples
traffic data files are downloaded for a wide area with hundreds of loop detector. This function cuts data to the route (e.g. continuous section of a road or a specific road) users would like to study.
1 2 3 4 5 |
x |
object of class 'midas' |
road |
character. road to be studied e.g. "M25" or "A2" |
traffic.bound |
character. "clockwise" or "anticlockwise" section of the road. Default to both c("clockwise", "anticlockwise") |
start.pt, end.pt |
code of the selected start (e.g. "4860") and end (e.g. "4909") points. If NULL, then all specified roads are selected. Default to NULL |
location.info |
character. there are three options for location of loop detector (mainline, on-ramp, or off-ramp). if mainline data for a section is needed, then specify as "mainline". Default to c("mainline", "onramp", "offramp") |
description |
character. names of the road, code, direction, and location columns which are created using addDescMIDAS. Change if the column names are changed. Default to c("road", "code", "direction", "location"). If these are not created, the function automatically uses addDescMIDAS to add these |
... |
optional. additional arguments to addDescMIDAS() |
drop.onramp.duplicate, drop.offramp.duplicate |
traffic data sometime has duplicate geographic address for the same location or multiple loop detectors on the same on/off ramp. If any needs to be droped then specify their codes (e.g. "4890") |
'midas' object cut to the specified route
addDescMIDAS, cutTimeMIDAS
1 2 3 4 5 6 7 8 9 | ## Not run:
#md is a one .csv data set you've downloaded
#select a 5 km route on the anticlockwise of M25 motorway starting
#from the loop detector 4909 and ending at 4860. Only mainline data are extracted
ex <- addDescMIDAS(x = md)
sub.ex <- routeMIDAS(x = ex, road = "M25", traffic.bound = "anticlockwise",
start.pt = "4909", end.pt = "4860", location.info = c("mainline","onramp"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.