【发布时间】:2020-09-10 08:00:50
【问题描述】:
你好,我的 df 看起来像
PID Stage
123 1
123 2
123 4
124 1
124 3
137 2
137 3
153 1
153 4
153 5
167 4
167 5
178 1
178 2
178 1
187 3
187 4
我想根据 >= 4 Stage 的行删除记录
预期输出
PID Stage
124 1
124 3
137 2
137 3
178 1
178 2
178 1
提前致谢
【问题讨论】:
-
RowsOfInterest <- df[ , 'Stage' ] < 4; Result <- df[ RowsOfInterest , ];