这个问题是对此的后续:根据个人注视计算相互注视。
我正在研究传统对话中问答序列中的注视数据,想知道何时以及持续多长时间出现相互注视,即一个人看着另一个人,另一个人也看着另一个人。上一个问题的答案很好地处理了只有说话者和听众之间相互注视的问答序列,但它无法处理两个听众之间也相互注视的情况。
我拥有的数据类型如下所示:
GazeID Sequ Utterance Q_by Answ_by Gaze_by Gaze_to Role start end Gaze_pair
1: 1 55 where...? A B A B Speaker 100 700 AB
2: 2 55 where...? A B B A Answerer 0 200 AB
3: 3 55 where...? A B B C Answerer 230 500 BC
4: 4 55 where...? A B C B NonAnswerer 120 620 BC
5: 5 55 where...? A B C A NonAnswerer 650 700 AC
这里,和 之间有相互注视(i)Speaker
,而且和 之间Answerer
也有相互注视,因此所需的输出是这样的:Answerer
NonAnswerer
Sequ Utterance MG_start MG_end MG_dur Gaze_pair
1: 55 where...? 100 200 100 AB
2: 55 where...? 230 500 270 BC
data.table
我尝试将基于函数构建的上一个问题的解决方案应用foverlaps
到这个场景,但收到了错误。
注意:在任何一个问答序列中,可以有多次相互注视,并且可以有 (i) Speaker_Answerer
、(ii)Speaker-NonAnswerer
和 (iii)之间的相互注视Answerer-NonAnswerer
。
任何关于此问题的帮助都将不胜感激。
可重复的数据:
gazes <- structure(list(GazeID = 1:5, Sequ = c(55, 55, 55, 55, 55), Utterance = c("where...?",
"where...?", "where...?", "where...?", "where...?"), Q_by = c("A",
"A", "A", "A", "A"), Answ_by = c("B", "B", "B", "B", "B"), Gaze_by = c("A",
"B", "B", "C", "C"), Gaze_to = c("B", "A", "C", "B", "A"), Role = c("Speaker",
"Answerer", "Answerer", "NonAnswerer", "NonAnswerer"), start = c(100L,
0L, 230L, 120L, 650L), end = c(700L, 200L, 500L, 620L, 700L),
Gaze_pair = c("AB", "AB", "BC", "BC", "AC")), class = c("tbl_df",
"tbl", "data.frame"), row.names = c(NA, -5L))