hc_tidy_series: Shorcut for tidy data frame

Description Usage Arguments Examples

View source: R/hc.R

Description

Helper function to create highchart graph from tidy datasets.

Usage

1
hc_tidy_series(hc, data, categories, values, ...)

Arguments

hc

A highchart htmlwidget object.

data

data.frame with data.

categories

bare column name of categories (one for every series)

values

bare column name of values

Examples

1
2
3
4
5
6
7
8
dat <- data.frame("id" = c(1,2,3,4,5,6), 
       "grp" = c("A","A","B","B","C","C"),
       "value" = c(10,13,9,15,11,16))

highchart() %>% 
 hc_chart(type = "column") %>% 
 hc_tidy_series(data = dat, categories = grp, values = value)
  

Eflores89/eem documentation built on June 30, 2020, 2:53 a.m.