add Documentation for write_to_csv
This commit is contained in:
@@ -205,6 +205,14 @@ parse_speakerliste <- function(speakerliste_xml) {
|
|||||||
rolle_lang = d["rolle_lang",])
|
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
|
#' @export
|
||||||
write_to_csv <- function(tables, path="csv/", create=F) {
|
write_to_csv <- function(tables, path="csv/", create=F) {
|
||||||
check_directory(path, create)
|
check_directory(path, create)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
}
|
||||||
+7
-2
@@ -4,8 +4,13 @@
|
|||||||
\alias{repair}
|
\alias{repair}
|
||||||
\title{Repair parsed tables}
|
\title{Repair parsed tables}
|
||||||
\usage{
|
\usage{
|
||||||
repair(parse_output)
|
repair(parse_output, repair_comments = FALSE)
|
||||||
}
|
}
|
||||||
\description{
|
\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.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user