请教:刚刚学习R,想做beeswarm+bsplot,下面红色部分的formula在输入命令时写成y ~ grp的形式,y、grp应该是分别对应生成plot的纵坐标和横坐标,可是y、grp在之前要如何设置,我按命令示例“ beeswarm(len ~ dose, data = ToothGrowth)”导入我的数据时(也在我的数据表中对应的行标题中改为了len、dose),但提示找不到len、dose,请教下大家是为什么,应该怎么设置,多谢!bxplot(x, ...) ## S3 method for class 'formula':bxplot((formula, data = NULL, ..., subset, na.action = NULL))formulaA formula, such as y ~ grp, where y is a numeric vector of data values to be split into groups according to the grouping variable grp (usually a factor). beeswarm(len ~ dose, data = ToothGrowth) bxplot(len ~ dose, data = ToothGrowth, add = TRUE)
|