add_lines {talkr} | R Documentation |
Add information for line-by-line visualization
Description
This function adds columns to the dataset that adds a line ID, and changes columns with timestamps relative to the beginning of the line, so data can be visualized line-by-line. The participant column is also adjusted to create a Y-coordinate for each speaker. The line duration is set to 60 seconds by default.
Usage
add_lines(data, time_columns = c("begin", "end"), line_duration = 60000)
Arguments
data |
dataset to divide into lines |
time_columns |
columns with timestamps that need to be adjusted to line-relative time |
line_duration |
length of line (in ms) |
Details
This transformation can be done for multiple columns with time-stamped data. Use the 'time_columns' argument to supply the names of one or more columns that should be transformed.
Value
data set with added columns: 'line_id', 'line_participant', and 'line_column' for every column in 'time_columns'
[Package talkr version 0.1.3 Index]