Learn R Programming

billboarder (version 0.2.4)

billboard-aes: Map variables on the chart

Description

Map variables on the chart

Usage

bb_aes(bb, x, y, group = NULL, ...)

bb_aes_string(bb, x, y, group = NULL, ...)

bbaes(x, y, group = NULL, ...)

bbaes_string(x, y, group = NULL, ...)

Arguments

bb

A billboard htmlwidget object.

x

Name of the variable to map on the x-axis.

y

Name of the variable to map on the y-axis.

group

Name of the grouping variable.

...

Additional mapping parameters, for now only 'size' for scatter plot is used.

Value

A billboard htmlwidget object.

Examples

Run this code
# NOT RUN {
dat <- as.data.frame(table(sample(letters[1:5], 100, TRUE)))

billboarder(data = dat) %>% 
  bb_aes(x = Var1, y = Freq) %>% 
  bb_barchart()


tab <- table(sample(letters[1:5], 100, TRUE), sample(LETTERS[1:5], 100, TRUE))
dat_group <- as.data.frame(tab)

billboarder(data = dat_group) %>% 
  bb_aes(x = Var1, y = Freq, group = "Var2") %>% 
  bb_barchart()
# }

Run the code above in your browser using DataLab