An R package to analyze the parliamentary records of the 19th legislative period of the Bundestag, the German parliament.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
387B

  1. #' @export
  2. find_word <- function(res, word) {
  3. talks <- res$talks
  4. mutate(talks, occurences = sapply(str_match_all(talks$content, regex(word, ignore_case = TRUE)),
  5. nrow))
  6. }
  7. #' @export
  8. join_redner <- function(tb, res, fraktion_only = F) {
  9. joined <- left_join(tb, res$redner, by=c("redner" = "id"))
  10. if (fraktion_only) select(joined, "fraktion")
  11. else joined
  12. }