fix vignette
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
^doc$
|
||||
^Meta$
|
||||
^.*\.Rproj$
|
||||
^\.Rproj\.user$
|
||||
|
||||
@@ -6,3 +6,5 @@
|
||||
!/reports/*.tex
|
||||
/csv/*
|
||||
/parlament_49_53_texts/
|
||||
.Rproj.user
|
||||
*.Rproj
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
export(fetch_all)
|
||||
export(read_all)
|
||||
export(read_from_csv)
|
||||
export(repair)
|
||||
export(write_to_csv)
|
||||
import(dplyr)
|
||||
import(pbapply)
|
||||
import(purrr)
|
||||
|
||||
@@ -189,6 +189,7 @@ parse_rednerliste <- function(rednerliste_xml) {
|
||||
rolle_lang = d["rolle_lang",])
|
||||
}
|
||||
|
||||
#' @export
|
||||
write_to_csv <- function(tables, path="csv/", create=F) {
|
||||
check_directory(path, create)
|
||||
write.table(tables$redner, str_c(path, "redner.csv"))
|
||||
@@ -197,6 +198,7 @@ write_to_csv <- function(tables, path="csv/", create=F) {
|
||||
write.table(tables$comments, str_c(path, "comments.csv"))
|
||||
}
|
||||
|
||||
#' @export
|
||||
read_from_csv <- function(path="csv/") {
|
||||
list(redner = read.table(str_c(path, "redner.csv")) %>%
|
||||
tibble() %>%
|
||||
|
||||
@@ -39,7 +39,7 @@ the result into more descriptive variables.
|
||||
|
||||
For development purposes, we load the tables from csv files.
|
||||
```{r}
|
||||
tables <- read_from_csv('csv/')
|
||||
tables <- read_from_csv('../csv/')
|
||||
|
||||
comments <- tables$comments
|
||||
reden <- tables$reden
|
||||
|
||||
Reference in New Issue
Block a user