How to merge list of zoo objects

僤鯓⒐⒋嵵緔 提交于 2019-12-25 04:51:08

问题


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?


回答1:


Use do.call:

do.call("merge", my_list)

Note that the zoo objects do not have to be the same length.



来源:https://stackoverflow.com/questions/28160424/how-to-merge-list-of-zoo-objects

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!