【发布时间】:2019-02-14 19:40:26
【问题描述】:
从数据框中删除列表中值匹配的行 > 我的帐户列表如下:
ANrule4 <-
Group_Account
2911
2944
2949
1415
1695
1761
1912
2570
但我想删除以下列表中列出的任何帐户:
2911
2946
2945
2944
2949
我正在使用以下代码:
ANrules4ex <- ANrule4%>%
filter(!(Group_Account==2946 | Group_Account==2945 | Group_Account==2944 | Group_Account==2942 | Group_Account==2941 | Group_Account==2912 | Group_Account==2911 | Group_Account==2910 ))
这工作正常,但实际上我的列表非常长且动态,我想将排除列表存储在一个列表中,并希望合并这两个列表,将所有帐户都列在排除列表中,但不知道该怎么做。谁能帮我解决这个问题
【问题讨论】:
标签: r filter merge conditional