【发布时间】:2020-05-27 15:51:59
【问题描述】:
我是编码新手,想根据我的数据创建箱线图。
为此,我想按特定值过滤箱线图:
我的数据结构称为“Auswertungen”,其结构如下:
Participant Donation Treatment Manipulation
1 0 1 passed
2 0.4 2 passed
3 0.2 2 failed
4 0 3 failed
5 0.3 3 passed
现在我想使用箱线图绘制基于治疗的捐赠。我想绘制图表,一张包含所有数据点,另一张没有操作失败的数据点。
我发现了类似的东西
boxplot(Donation ~ Treatment)
with(subset(Auswertungen, Manipulation == "passed"), boxplot(Donation ~ Treatment))
但第二个公式向我显示的箱线图与以前完全相同,所以我猜该子集不起作用?
【问题讨论】: