add documentation to read_from_csv and write_to_csv
This commit is contained in:
@@ -205,6 +205,14 @@ parse_speakerlist <- function(speakerliste_xml) {
|
||||
rolle_lang = d["rolle_lang",])
|
||||
}
|
||||
|
||||
#' Write the parsed and repaired results into a csv file to make loading and developing faster and easier
|
||||
#'
|
||||
#' @param tables tibble list
|
||||
#' @param path char
|
||||
#' @param create bool
|
||||
#'
|
||||
#' if create is set to TRUE, the directory given in path is created
|
||||
#'
|
||||
#' @export
|
||||
write_to_csv <- function(tables, path="csv/", create=F) {
|
||||
check_directory(path, create)
|
||||
@@ -215,6 +223,12 @@ write_to_csv <- function(tables, path="csv/", create=F) {
|
||||
write.table(tables$applause, str_c(path, "applause.csv"))
|
||||
}
|
||||
|
||||
#' Read the needed tables for developing from a csv file.
|
||||
#'
|
||||
#' @param path char
|
||||
#'
|
||||
#' Reading the tables from a csv is way faster than reading and repairing the data every single time
|
||||
#'
|
||||
#' @export
|
||||
read_from_csv <- function(path="csv/") {
|
||||
list(speaker = read.table(str_c(path, "speaker.csv")) %>%
|
||||
|
||||
Reference in New Issue
Block a user