extime {gmoTree} | R Documentation |
Calculate the time that was spent on the whole experiment
Description
Calculate the time spent on the experiment. If not stated otherwise, the calculation only starts at the end of the first page!
Usage
extime(
oTree,
pcode = NULL,
plabel = NULL,
group_id = NULL,
seconds = FALSE,
rounded = TRUE,
digits = 2L,
startat = 1L,
tz = "UTC",
sinfo = "session_code",
combine = TRUE
)
Arguments
oTree |
A list of data frames that were created
by |
pcode |
Character. The value of the |
plabel |
Character. The value of the |
group_id |
Integer. The value of the group_id variable if the
time should only be calculated for one specified group. The |
seconds |
Logical. |
rounded |
Logical. |
digits |
Integer. The number of digits to which the output
should be rounded.
This parameter has no effect unless |
startat |
Integer or character string |
tz |
Character. Time zone. |
sinfo |
Character. |
combine |
Logical. |
Details
This functions calculates the time spent on the experiment by using
the variable that refers to the time stamp. If that variable is not
present, the function alternatively uses seconds_on_page2
,
which can be created with the pagesec
function.
Value
This function returns either a single value if only the data of one person is calculated or a list of information on the time several participants spent on the experiment.
In this list, you can find the following information:
- $mean_duration
= The experiment's average duration.
- $min_duration
= The experiment's minimum duration.
- $max_duration
= The experiment's maximum duration.
- $single_durations
= A data frame of all durations that
are used for calculating the min, max, and mean duration.
- $messages
= All important notes to the calculations.
- $only_one_page
= A vector of all individuals who
only have one time stamp.
Examples
# Use package-internal list of oTree data frames
oTree <- gmoTree::oTree
# Show time for one participant
extime(oTree, pcode = "wk247s9w")
# Make a data frame of durations
extime(oTree)
# Make a data frame of durations (beginning from the end of the second page)
extime(oTree, startat = 2)