pagesec | R Documentation |
Create a new variable in the $Time
data frame that contains the time
spent on each page.
pagesec(oTree, rounded = TRUE, digits = 2, minutes = FALSE, combine = FALSE)
oTree |
A list of data frames created
with |
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. |
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
.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.