I need to create a nested category box-plot where the x-axis is a combination of 2 factor(category) groups.
In ly_boxplot()
, the x
argument can either be a numeric vector or a factor. Is there a way that it will accept a combined factor, say, of 2 or more factors?
The picture below is taken from this link.
How can I create such a plot using rbokeh
library in R?
Use the interaction
function.
library(rbokeh)
figure(ylab = "Length (mm?)", xlab="Dose (mg/day) : Supplement") %>%
ly_boxplot(len, interaction(dose,supp), data = ToothGrowth)