willschulz / tricordR

Twitter study management via R
MIT License
0 stars 0 forks source link

getFollowersBig rbind issue #7

Open alexikim opened 2 years ago

alexikim commented 2 years ago

Cron job running well for friends and timelines. Followers we are running into a small error that I think should be a quick fix and I believe is stemming from line 870-871 or 878/882. This error shows up when number of columns you are trying to bind together do not match. Putting in a few options below, not sure which route you prefer.

Error:

Error in rbind(deparse.level, ...) : 
  numbers of columns of arguments do not match
Calls: scrapePanel ... scrapeFollowers -> getFollowersBig -> do.call -> <Anonymous> -> rbind
Execution halted

Here are some things I am reading up on this:

Find the column commons first with intersect(colnames(train), colnames(test)) and the rbind those. https://stackoverflow.com/questions/61120906/error-in-rbinddeparse-level-numbers-of-columns-of-arguments-do-not-matc

OR: Using bind_rows (or similarly plyr::rbind.fill) may be more flexible than rbind. https://stackoverflow.com/questions/50821024/numbers-of-columns-of-arguments-do-not-match

Other option: plyr::rbind.fillif want missing columns (i.e. from diff num of columns) with NA. https://stackoverflow.com/questions/46263982/error-in-rbinddeparse-level-invalid-list-argument-all-variables-should.

willschulz commented 2 years ago

patched by changing two uses of rbind to bind_rows, we'll see if that fixes it