readMIDAS: reads and creates a MIDAS object

Description Usage Arguments Value See Also Examples

Description

function to read downloaded MIDAS .csv file and create a MIDAS object

Usage

1
2
3
4
readMIDAS(file.name = file.choose(), 
	col.classes.m = c("character", rep("NULL", 4), rep("factor", 2), rep("numeric", 33)), 
	na.strings.m = "-1", ..., args.createMIDAS = list())
	

Arguments

file.name

.csv traffic data file to be read

col.classes.m

vector. classes of the 40 columns of midas traffic data. first column is the Geograhic.Address, 4 NULL columns are details of the CO/LCC/transponder/Device address, change to "character" if information needed. Date and Time as factors, see datetimeMIDAS to change to date/time class all other columns are number of lanes/flow per category/ speed per lane/flow per lane/occupancy per lane/headway per lane at each geographic address.

na.strings.m

character. na value in the midas traffic data are set to "-1"

...

?read.csv for information

args.createMIDAS

list. additional arguments to createMIDAS function

Value

reads the downloaded and decoded midas traffic data file and creates a midas object which is a list with traffic.date and collection date elements

See Also

createMIDAS

Examples

1
2
3
4
5
6
## Not run: 
system.time(ex <- readMIDAS(file.name = file.choose()))
system.time(ex <- readMIDAS(file.name = paste(getwd(), "/70010410.tcd.csv", sep = "")))
head(ex)

## End(Not run)

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