标签: r rbokeh
我需要创建一个嵌套的类别箱形图,其中的x轴是2个因子(类别)组的组合。 在ly_boxplot()中,x参数可以是数字向量或 factor 。有没有办法接受两个或两个以上因素的综合因素?
ly_boxplot()
x
以下图片摘自this link。
如何使用R中的rbokeh库创建这样的图?
rbokeh
答案 0 :(得分:1)
使用interaction函数。
interaction
library(rbokeh) figure(ylab = "Length (mm?)", xlab="Dose (mg/day) : Supplement") %>% ly_boxplot(len, interaction(dose,supp), data = ToothGrowth)