responsiveness: responsiveness

Description Usage Arguments Value Examples

View source: R/responsiveness.R

Description

utterances by focus/target role that are responded to by responder within some threshold time and average lag of 'responses' regardless of threshold

Usage

1
2
3
responsiveness(xfile, focus = c("child", "female", "male", "adult"),
  responder = c("child", "female", "male", "adult"), threshold = 2,
  short_output = TRUE, ...)

Arguments

xfile

character, file path to rttm or eaf file

focus

character, either "child", "female", "male" or "adult", whose utterances are checked whether they are responded to

responder

character, either "child", "female", "male" or "adult", whose responses are considered

threshold

numeric, the threshold to be considered (default is 2), i.e. utterance of "responder" must have started no later than this number from the end of an utterance of "focus"

short_output

logical, should the summaries be returned (default is TRUE), or alternatively a data frame with each row being one utterance and the relevant information represented as columns

...

additional arguments (currently from and to for read_rttm)

Value

a list with four items (utterances: the number of utterances by focus/target and responder, responses: the number of responses by responder, response_lag: median lag of first utterance of responder after each utterance of focus and threshold: the threshold value used)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
xfile <- system.file("yunitator_english_spanish.rttm", package = "avutils")
responsiveness(xfile, focus = "child", responder = "female")
responsiveness(xfile, focus = "child", responder = "male")
responsiveness(xfile, focus = "child", responder = "adult")
head(responsiveness(xfile,
                    focus = "child",
                    responder = "adult",
                    short_output = FALSE))

# with a subset (second minute of annotations)
responsiveness(xfile, focus = "child", responder = "female", from = 60, to = 120)
responsiveness(xfile, focus = "child", responder = "female")

gobbios/avutils documentation built on Feb. 19, 2020, 9:44 a.m.