减去两个数据集
我有 2 个数据集。一个是父数据集 (A),另一个是其子集 (B)。我想从 A 创建一个不包含 B 行的数据集。它应该类似于
C=AB
数据集 A 和 B 都具有相同的列数和列名称。
I have 2 datasets. One is the parent dataset (A) and other one is a subset (B) of it. I want to create a dataset from A which does not contain rows from B. It should be something like
C=A-B
Both the datasets A and B have same number of columns and column names.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果 B 是 A 的实际
子集
,则可以在rownames
上使用setdiff
:If B is an actual
subset
of A, you can usesetdiff
onrownames
:如果不想将其转换为字符串进行比较,即进行精确匹配
你可以试试这个
If you do not want to convert it into a string for comparing, i.e Do exact matches
you can try this out
像下面这样的东西可能会起作用:
Something like the following might do the trick: