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