hc_add_onclick_korap_search {RKorAPClient}R Documentation

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)

Arguments

hc

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

Value

The input highchart object with added on-click events.

See Also

Other highcharter-helpers: hc_freq_by_year_ci()

Examples

## Not run: 

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()

## End(Not run)


[Package RKorAPClient version 0.8.1 Index]