Creates a bar chart using Highcharter library.

hgch_bar(data, dic = NULL, var_cat = NULL, var_num = NULL, ...)

Arguments

data

a data frame containing the variables to be plotted.

dic

a named list, each element corresponding to a column name in data and defining a set of labels for that column.

var_cat

a character vector with the names of categorical variables.

var_num

a character vector with the names of numerical variables.

...

additional arguments to be passed to dsviz_default_opts

Value

a Highcharter bar chart.

See also

Examples

data(mtcars)
mtcars$cyl <- as.character(mtcars$cyl)
mtcars <- mtcars |> dplyr::group_by(cyl) |> dplyr::summarise(mpg = mean(mpg))
hgch_bar(mtcars, var_cat = "cyl", var_num = "mpg")
#> in theme_datasketch