add_session {webtrackR} | R Documentation |
Add a session variable
Description
add_session()
groups visits into "sessions", defining a session to end
when the difference between two consecutive timestamps exceeds a cutoff
.
Usage
add_session(wt, cutoff)
Arguments
wt |
webtrack data object. |
cutoff |
numeric (seconds). If the difference between two consecutive timestamps exceeds this value, a new browsing session is defined. |
Value
webtrack data.frame with the same columns as wt and a new column called session.
Examples
## Not run:
data("testdt_tracking")
wt <- as.wt_dt(testdt_tracking)
# Setting cutoff to 30 minutes
wt <- add_session(wt, cutoff = 1800)
## End(Not run)
[Package webtrackR version 0.3.1 Index]