1

I'm trying to split a set of data. Simplified as something like this

test <- data.frame(1:500)
test <- split(test, 1:99, drop = FALSE)
for (i in test){

}

I'm trying to add a column to each of the newly created dataframes, and then wait 60 seconds before doing so for the next set of 99. Upon adding the final row of the new column in the last group, I'd like to re-combine the split dataframes.

I don't know how to reference the newly created "split" dataframes, and I don't know how to add the delay.

Community
  • 1
  • 1
Frank Drin
  • 1,613
  • 2
  • 13
  • 18
  • Welcome to Stack Overflow. Please always try to supply a `dput` of your data so we can reproduce your issue locally. See [this post](http://stackoverflow.com/q/5963269/1152809) for more info on how to produce an R question that will get answered as quickly as possible. Don't forget to upvote anything helpful, and mark correct answers to help people in the future. – Travis Heeter Jan 17 '17 at 18:49
  • I'd say don't do that. It seems doubtful that there is any good reason to split them in the first place... Regarding your questions, google gives: http://stackoverflow.com/questions/2392915/recombining-a-list-of-data-frames-into-a-single-data-frame and https://stat.ethz.ch/R-manual/R-devel/library/base/html/Sys.sleep.html Generally best to ask one question at a time and provide real working code relevant to it, as Travis suggested. – Frank Jan 17 '17 at 18:52
  • Hey guys. Sorry, but this is using an add-in called OpenFIGI as well as RBlpapi which I dont imagine most people have access to, so I didnt think my actual code would be relevant. Basically OpenFIGI seems to only run on a dataframe with one item in it, so you cant for example add a column and just put in a 60 second delay. The ideal answer is to use PLYR, but I cant add a 60 second delay every 100 tickers within the PLYR add-in, so im completely stuck, and not sure how to phrase the question any better.... – Frank Drin Jan 17 '17 at 20:04

0 Answers0