diff --git a/R/parse.R b/R/parse.R index db99eb5..d203780 100644 --- a/R/parse.R +++ b/R/parse.R @@ -205,6 +205,14 @@ parse_speakerliste <- function(speakerliste_xml) { rolle_lang = d["rolle_lang",]) } +#' Write to CSV-Document +#' +#' Put all tables from the entered list in separate CSV documents. +#' +#' @param tables The List of Tables you want to convert into a CSV-Document. +#' @param path The path where to put the CSV-Document. +#' @param create Set TRUE if the path does not exist yet and you want to create it. +#' #' @export write_to_csv <- function(tables, path="csv/", create=F) { check_directory(path, create) diff --git a/man/lookup_speaker.Rd b/man/lookup_speaker.Rd new file mode 100644 index 0000000..0888e14 --- /dev/null +++ b/man/lookup_speaker.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/repair.R +\name{lookup_speaker} +\alias{lookup_speaker} +\title{Lookup name in speakers table} +\usage{ +lookup_speaker(tb, speaker, name_variable) +} +\arguments{ +\item{tb}{tibble} + +\item{name_variable}{name + +Tries to match the name_variable column with speaker names + +returns a lookup table} + +\item{redner}{tibble} +} +\description{ +Tries to find the correct speaker id given a name. +This is sufficient since every prename lastname combination in the bundestag is +unique (luckily :D) +} diff --git a/man/repair.Rd b/man/repair.Rd index c7e0342..285412b 100644 --- a/man/repair.Rd +++ b/man/repair.Rd @@ -4,8 +4,13 @@ \alias{repair} \title{Repair parsed tables} \usage{ -repair(parse_output) +repair(parse_output, repair_comments = FALSE) } \description{ -Repair parsed tables +TODO: Explain repair_comments argument +(if TRUE, we try to lookup redner names in redner table) +} +\details{ +Possible test: check identical(repair(res), repair(repair(res))) == TRUE +Since repaired tables should be a fixpoint of repair. } diff --git a/man/write_to_csv.Rd b/man/write_to_csv.Rd new file mode 100644 index 0000000..6c05a74 --- /dev/null +++ b/man/write_to_csv.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/parse.R +\name{write_to_csv} +\alias{write_to_csv} +\title{Write to CSV-Document} +\usage{ +write_to_csv(tables, path = "csv/", create = F) +} +\arguments{ +\item{tables}{The List of Tables you want to convert into a CSV-Document.} + +\item{path}{The path where to put the CSV-Document.} + +\item{create}{Set TRUE if the path does not exist yet and you want to create it.} +} +\description{ +Put all tables from the entered list in separate CSV documents. +}