Closed pagelj closed 4 years ago
This is a consequence of NA
values in the character column.
The second line in this snippet:
drama <- loadDrama("ksd1.0", defaultCollection = "qd")
drama$text <- drama$text[!is.na(drama$text$Speaker.figure_id),]
can be used as hot fix, but we need a better solution.
Added code to loadDrama()
that checks whether there are NA
values, display warning and remove the rows in the text
table.
There is a strange error in
presence()
with line https://github.com/quadrama/DramaAnalysis/blob/master/R/presence.R#L62:conf.active$actives <- rowSums(conf.active[,4:ncol(conf.active)])
Error:
This occurred for
qd:qdjz.0
andqd:x3cv.0
, but not for any other text tested (around 40)Running
conf.active[,4:ncol(conf.active)]
seems to work fine, the issue is withinrowSums