add basic analysing utils
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
#' @export
|
||||
find_word <- function(res, word) {
|
||||
talks <- res$talks
|
||||
mutate(talks, occurences = sapply(str_match_all(talks$content, regex(word, ignore_case = TRUE)),
|
||||
nrow))
|
||||
}
|
||||
|
||||
#' @export
|
||||
join_redner <- function(tb, res, fraktion_only = F) {
|
||||
joined <- left_join(tb, res$redner, by=c("redner" = "id"))
|
||||
if (fraktion_only) select(joined, "fraktion")
|
||||
else joined
|
||||
}
|
||||
Reference in New Issue
Block a user