do.call

How to pass “nothing” as an argument to `[` for subsetting?

眉间皱痕 提交于 2019-11-26 16:43:25
问题 I was hoping to be able to construct a do.call formula for subsetting without having to identify the actual range of every dimension in the input array. The problem I'm running into is that I can't figure out how to mimic the direct function x[,,1:n,] , where no entry in the other dimensions means "grab all elements." Here's some sample code, which fails. So far as I can tell, either [ or do.call replaces my NULL list values with 1 for the index. x<-array(1:6,c(2,3)) dimlist<-vector('list',

Trouble converting long list of data.frames (~1 million) to single data.frame using do.call and ldply

青春壹個敷衍的年華 提交于 2019-11-26 15:48:24
问题 I know there are many questions here in SO about ways to convert a list of data.frames to a single data.frame using do.call or ldply, but this questions is about understanding the inner workings of both methods and trying to figure out why I can't get either to work for concatenating a list of almost 1 million df's of the same structure, same field names, etc. into a single data.frame. Each data.frame is of one row and 21 columns. The data started out as a JSON file, which I converted to