blob: c56120ec4f729d3edf8b85d8366ddb28d5b47dc2 [file] [log] [blame]
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)