| library(RKorAPClient) |
| library(highcharter) |
| library(idsThemeR) |
| |
| df <- new("KorAPConnection", verbose = TRUE) %>% |
| frequencyQuery("sozusagen/i", vc = c("corpusSigle=FOLK", "corpusSigle!=FOLK")) %>% |
| ipm() %>% |
| mutate(corpus = c("FOLK", "DeReKo")) |
| |
| hc <- highchart() %>% |
| hc_add_theme(hc_theme_ids_light()) %>% |
| hc_add_series(type = "column", data = df, hcaes(corpus, ipm)) %>% |
| hc_add_series( |
| data = df, |
| hcaes( |
| x = corpus, |
| y = ipm, |
| low = conf.low, |
| high = conf.high |
| ), |
| type = "errorbar", |
| stemWidth = 2, |
| whiskerWidth = 2, |
| whiskerLength = 30 |
| ) %>% |
| hc_yAxis(title=list(text="IPM")) %>% |
| hc_xAxis(categories = c("FOLK-excerpt", "DeReKo")) %>% |
| hc_legend(enabled = FALSE) %>% |
| hc_title(text = "Frequency of 'sozusagen' in FOLK (excerpt) vs. DeReKo") |
| |
| |
| print(hc) |