Initial import
Change-Id: I59748a78b35a3e14013333912966971a02dd19b4
diff --git a/demo/highcharter-boxplot.R b/demo/highcharter-boxplot.R
new file mode 100644
index 0000000..c56120e
--- /dev/null
+++ b/demo/highcharter-boxplot.R
@@ -0,0 +1,32 @@
+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)