calc_time_btw_active_events | R Documentation |
Computes duration as the difference between the timestamps of active events. To do so, this subsets to active events, computes durations, and handles some edge cases.
calc_time_btw_active_events(dt)
dt |
Data table of the form produced by |
Determines active event durations by:
Filtering out passive and non-interview events
Computing difference between active events
Passive events include:
Events of the following types in event
: c("ApproveByHeadquarter", "ApproveBySupervisor", "ClosedBySupervisor", "KeyAssigned", "OpenedBySupervisor", "QuestionDeclaredInvalid", "QuestionDeclaredValid", "ReceivedByInterviewer", "ReceivedBySupervisor", "RejectedByHeadquarter", "RejectedBySupervisor", "SupervisorAssigned", "TranslationSwitched", "UnapproveByHeadquarters", "VariableDisabled", "VariableSet")
Pauses in the interview–that is, time between Pause
and Resume
events
End and resumption of the interview–that is between events and Restarted
or between Restarted
and an event
All other events are considered active
Data table of active events with two new columns: elapsed_sec
and elapsed_min
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.