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