Need to think about ways to speed up the code. Code profiling seems to show that the stingr::str_extract() function is the slowest part of process. One idea is to filter out rows with applicable codes and then merge them back with the original data passed in by the user. Sometimes a large portion of the data has no injury codes at all.
Need to think about ways to speed up the code. Code profiling seems to show that the stingr::str_extract() function is the slowest part of process. One idea is to filter out rows with applicable codes and then merge them back with the original data passed in by the user. Sometimes a large portion of the data has no injury codes at all.