make hateimparlament a package, create stub vignette with funwithdata content

This commit is contained in:
2021-06-24 21:45:52 +02:00
parent a7e9ba9655
commit e36498da69
12 changed files with 121 additions and 51 deletions
+2
View File
@@ -0,0 +1,2 @@
*.html
*.R
+36
View File
@@ -0,0 +1,36 @@
---
title: "funwithdata"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{funwithdata}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
```r
read_all() %>% repair() -> res
reden <- res$reden
redner <- res$redner
talks <- res$talks
# first tries
left_join(reden, redner, by=c("redner" = "id")) %>%
group_by(fraktion) %>%
summarize(n = n()) %>%
ggplot(aes(x = fraktion, y = n)) +
geom_bar(stat = "identity")
```
```{r setup}
library(hateimparlament)
```