Add an example with plot to Readme.md
Change-Id: I51c6973ed331b038ed08aa17c7904a15e21a80b0
diff --git a/Readme.md b/Readme.md
index 314be8d..2071600 100644
--- a/Readme.md
+++ b/Readme.md
@@ -27,6 +27,20 @@
library(RKorAPClient)
new("KorAPConnection", verbose=TRUE) %>% corpusQuery("Hello world") %>% fetchAll()
```
+
+## Example
+```r
+library(RKorAPClient)
+library(ggplot2)
+kco <- new("KorAPConnection", verbose=TRUE)
+expand_grid(condition = c("textDomain = /Wirtschaft.*/", "textDomain != /Wirtschaft.*/"), year = (2002:2018)) %>%
+ cbind(frequencyQuery(kco, "[tt/l=Heuschrecke]", paste0(.$condition," & pubDate in ", .$year))) %>%
+ ipm() %>%
+ ggplot(aes(x = year, y = ipm, fill = condition, color = condition, ymin = conf.low, ymax = conf.high)) +
+ geom_freq_by_year_ci()
+```
+![](man/figures/Readme-Example-1.png)<!-- -->
+
## Demos
More elaborate R scripts demonstrating the use of the package can be found in the [demo](demo) folder.
diff --git a/man/figures/Readme-Example-1.png b/man/figures/Readme-Example-1.png
new file mode 100644
index 0000000..aa14eb3
--- /dev/null
+++ b/man/figures/Readme-Example-1.png
Binary files differ