blob: 4e530e8676690b19e6812773d3e7aa33e06e2d43 [file] [log] [blame]
Marc Kupietz5a336b62021-11-27 17:51:35 +01001---
2title: "Kookkurrenzanalyse zu aufmerksam"
3output:
4 html_document:
5 css: style.css
6 keep_md: yes
7---
8
9```{r setup, include=FALSE}
10knitr::opts_chunk$set(echo = FALSE, warnings = FALSE)
11library(RKorAPClient)
12library(kableExtra)
13library(DT)
14library(tidyverse)
15kco <- new("KorAPConnection", verbose=T)
16if (!exists('ca')) {
17ca <- kco %>%
18 collocationAnalysis(
19 "aufmerksam",
20 leftContextSize = 2,
21 rightContextSize = 2,
22 exactFrequencies = TRUE,
23 searchHitsSampleLimit = 1000,
24 topCollocatesLimit = 10,
25 withinSpan = "",
26 maxRecurse=1
27 )
28}
29```
30
31```{r ca}
32ca %>%
33 mutate(Beispiel=sprintf('<a href="%s">%s</a>', webUIRequestUrl, example)) %>%
34 select(Beispiel, logDice, pmi, ll) %>%
35 head(50) %>%
36 datatable(escape = F,
37 extensions = c('Buttons'),
38 options = list(
39 buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
40 pageLength = 25,
41 dom = 'ftpB'
42 )) %>%
43 formatRound(columns=~logDice + pmi + ll,digits=2)
44```