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 |
| 7 | --- |
| 8 | |
| 9 | ```{r setup, include=FALSE} |
| 10 | knitr::opts_chunk$set(echo = FALSE, warnings = FALSE) |
| 11 | library(RKorAPClient) |
| 12 | library(kableExtra) |
| 13 | library(DT) |
| 14 | library(tidyverse) |
| 15 | kco <- new("KorAPConnection", verbose=T) |
| 16 | if (!exists('ca')) { |
| 17 | ca <- 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} |
| 32 | ca %>% |
| 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 | ``` |