Learn R Programming

RKorAPClient (version 1.0.0)

hc_add_onclick_korap_search: Add KorAP search click events to highchart plots

Description

[Experimental]

Adds on-click events to data points of highcharts that were constructed with frequencyQuery() or collocationScoreQuery(). Clicks on data points then launch KorAP web UI queries for the given query term and virtual corpus in a separate tab.

Usage

hc_add_onclick_korap_search(hc)

Value

The input highchart object with added on-click events.

Arguments

hc

A highchart htmlwidget object generated by e.g. frequencyQuery().

See Also

Other highcharter-helpers: hc_freq_by_year_ci()

Examples

Run this code
if (FALSE) {

library(highcharter)
library(tidyr)

new("KorAPConnection", verbose = TRUE) %>%
  collocationScoreQuery("Team", "agil", vc = paste("pubDate in", c(2014:2018)),
                        lemmatizeNodeQuery = TRUE, lemmatizeCollocateQuery = TRUE) %>%
                         pivot_longer(c("O", "E")) %>%
  hchart(type="spline", hcaes(label, value, group=name)) %>%
  hc_add_onclick_korap_search()
}

Run the code above in your browser using DataLab