hgch_bar.Rd
Creates a bar chart using Highcharter library.
hgch_bar(data, dic = NULL, var_cat = NULL, var_num = NULL, ...)
a data frame containing the variables to be plotted.
a named list, each element corresponding to a column name in data
and defining a set of labels for that column.
a character vector with the names of categorical variables.
a character vector with the names of numerical variables.
additional arguments to be passed to dsviz_default_opts
a Highcharter bar chart.
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