Add rCharts demo using Highcharts

Change-Id: I4d348937b5db7888def2ccc763d9171de2cfbc46
diff --git a/R/misc.R b/R/misc.R
index 26ae123..9327a32 100644
--- a/R/misc.R
+++ b/R/misc.R
@@ -21,6 +21,29 @@
     mutate(ipm = .data$f * 10^6, conf.low = .data$conf.low * 10^6, conf.high = .data$conf.high * 10^6)
 }
 
+#' Convert corpus frequency table of alternatives to percent
+#'
+#' Convenience function for converting frequency tables of alternative variants
+#' (generated with \code{as.alternatives=T}) to percent.
+#'
+#' @param df table returned from \code{\link{frequencyQuery}}
+#'
+#' @return original table with converted columns \code{f}, \code{conf.low} and \code{conf.high}
+#' @export
+#'
+#' @importFrom dplyr .data
+#'
+#' @examples
+#' new("KorAPConnection") %>%
+#'     frequencyQuery(c("Tollpatsch", "Tolpatsch"),
+#'     vc=paste0("pubDate in ", 2000:2002),
+#'     as.alternatives = TRUE) %>%
+#'   percent()
+percent <- function(df) {
+  df %>%
+    mutate(f = .data$f * 10^2, conf.low = .data$conf.low * 10^2, conf.high = .data$conf.high * 10^2)
+}
+
 #' Convert query or vc strings to plot labels
 #'
 #' Converts a vector of query or vc strings to typically appropriate legend labels