pagesec {gmoTree} | R Documentation |
Calculate the seconds spent on each page
Description
Create a new variable in the $Time
data frame that contains the time
spent on each page.
Usage
pagesec(oTree, rounded = TRUE, digits = 2, minutes = FALSE, combine = FALSE)
Arguments
oTree |
A list of data frames that were created
by |
rounded |
Logical. |
digits |
Integer. The number of digits to which the
output should be rounded.
This parameter has no effect unless |
minutes |
Logical. |
combine |
Logical. |
Value
This function returns a duplicate of the original oTree list of
data frames that also contains a column in the $Time
data frame
named seconds_on_page2
or minutes_on_page
.
Examples
# Use package-internal list of oTree data frames
oTree <- gmoTree::oTree
# Create two new columns: seconds_on_page2 and minutes_on_page
oTree <- pagesec(oTree, rounded = TRUE, minutes = TRUE)
# Show the Time data frame
head(oTree$Time, n = 30)
[Package gmoTree version 1.1.0 Index]