【发布时间】:2018-11-13 22:18:38
【问题描述】:
假设我在 R 中有一个 data.frame
User Hardware
a mac
a tablet
a laptop
b laptop
b tablet
c tablet
c mac
如果用户有 mac,我只想保留 mac 行,如果用户没有 mac,则保留所有行。
我想要的输出
User Hardware
a mac
b laptop
b tablet
c mac
我一直在寻找和尝试,但无法找到解决方案。
【问题讨论】: