如何合并动物园对象列表 [英] How to merge list of zoo objects
本文介绍了如何合并动物园对象列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个动物园对象列表,我想合并它们.我已经确定它们的长度都一样.似乎为了合并它们,我需要做类似的事情,
I have a list of zoo objects, and I'd like to merge them. I've already made sure that they're all the same length. It seems that in order to merge them, I need to do something like,
merge(my_list[[1]],my_list[[2]]...)
但是随着列表长度的增加,这很快变得很麻烦.有人有处理这个问题的建议吗?
But this quickly becomes cumbersome as list length increases. Does someone have a suggestion on handling this?
推荐答案
使用do.call
:
do.call("merge", my_list)
请注意,动物园对象的长度不必相同.
Note that the zoo objects do not have to be the same length.
这篇关于如何合并动物园对象列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文