Description Usage Arguments Value Author(s) See Also Examples
Find where an individual is located at a specific time during continuous trip
1 | .locate(trip, id, at, na.rm, silent)
|
trip |
an object of data.frame containg person's continuous trip. |
id |
a vector of length 1, indicating person's ID |
at |
a numeric vector of length 1, specifying the time at which the location of an individual needs to be extracted |
silent |
logical. If TRUE, if any trip records have NAs in the time fields, a warning message will be provided. |
a single row data.frame containing correspond with 'at'
Seong-Yun Hong (syhong@khu.ac.kr)
1 2 3 4 5 6 7 8 9 10 11 | #creates sample trip data
testtrip <- data.frame(tr_id = 1:10, tr_seq = rep(NA, 10), purpose = rep(NA, 10),
mode = rep(NA, 10), o_type = rep(NA, 10),
o_time = c(200,300,400,500,600,700,800,900,1000,1100),
o_zone = c(1,2,3,4,5,6,5,4,3,2),
d_type = rep(NA, 10),
d_time = c(300,400,500,600,700,800,900,1000,1100,1200),
d_zone = c(2,3,4,5,6,5,4,3,2,1))
#Find where at 800 via .locate
.locate(testtrip, 1, 600, na.rm = TRUE, silent = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.