gen.sessions | R Documentation |
This function removes duplicate location records in user's mobility trajectory. Successive records at the same location are merged into a single session (with interval less than 'gap') recording the starting and ending times.
gen.sessions(x, y = NULL, t = NULL, gap = 0.5 * 3600, unite.sep = "_")
x, y, t |
see parameters of |
gap |
the time tolerance (sec) to combine two continuous observations |
unite.sep |
a separator to combine x and y coordinators into one column,
see also |
flowmap
, flowmap2
, flow.stat
data(movement) u1 <- movement %>% dplyr::filter(id==2) ## 1-column location indicators head(gen.sessions(u1$loc, t=u1$time)) ## 2-column location coordinates head(gen.sessions(u1$lon, u1$lat, u1$time))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.