Posted on

假如有 3 个基因列表存储在 R 的向量,此时 intersect(intersect(A, B), C) 可以取三者交集;假如 10 个基因列表呢? 9 层嵌套 intersect 恐怕丢人,写个 for 循环也挺麻烦, Reduce 函数就很方便,大概

genes <- Reduce(intersect, list(A, B, C, D ...))

这样。

发表评论

邮箱地址不会被公开。 必填项已用*标注