如何在 rbokeh 中创建 nested/grouped 类别的箱线图?
How to create a Box-plot of nested/grouped categories in rbokeh?
我需要创建一个嵌套类别箱线图,其中 x 轴是 2 个因子(类别)组的组合。
在 ly_boxplot()
中,x
参数可以是 数值向量 或 因子。有没有办法接受一个组合因子,比如 2 个或更多因子?
下图来自this link.
如何使用 R 中的 rbokeh
库创建这样的绘图?
使用interaction
函数。
library(rbokeh)
figure(ylab = "Length (mm?)", xlab="Dose (mg/day) : Supplement") %>%
ly_boxplot(len, interaction(dose,supp), data = ToothGrowth)
我需要创建一个嵌套类别箱线图,其中 x 轴是 2 个因子(类别)组的组合。
在 ly_boxplot()
中,x
参数可以是 数值向量 或 因子。有没有办法接受一个组合因子,比如 2 个或更多因子?
下图来自this link.
如何使用 R 中的 rbokeh
库创建这样的绘图?
使用interaction
函数。
library(rbokeh)
figure(ylab = "Length (mm?)", xlab="Dose (mg/day) : Supplement") %>%
ly_boxplot(len, interaction(dose,supp), data = ToothGrowth)