Closed nickrsan closed 4 years ago
One thing to consider is wrapping this function with suppressWarnings()
. Not ideal but would help. I'm not sure how to turn these off within the function, and in looking at the function itself I actually don't see where data.table::rbindlist()
is being called?
and interestingly, when I timed these, running with suppressWarnings significantly improved the speed of the function return!
library(tictoc)
tic("Start")
results_df <- suppressWarnings(get_results_as_df(results_ff)) # fastest
# results_df <- suppressWarnings(ffcAPIClient::get_results_as_df(results_ff)) # fast
# results_df <- ffcAPIClient::get_results_as_df(results_ff) # slowest
toc("Finish")
Looks like this issue may be fixed because of the replace_na
bit
Hah, I think I'd double filed this issue - thanks for pointing out that this is ready to close!
Currently getting a whole stream of warnings as we convert to a data frame. These are safe and I tried to provide parameters to acknowledge that I knew it was adding NAs, but it didn't get rid of warnings.