I am trying to figure out how to use a T/F value to use different functions...
Essentially, I am using the tryCatch function to produce a bunch of results. I have also created a function titled myTryCatch which is essentially the same, but additionally prints out some errors. I would like the user to be able to define whether or not they want to drop the errors, and if so use tryCatch, and if not, use myTryCatch instead (to print out the specific error received). Is there a way to dynamically change which function is used, without a copy/paste of the entire chunk of code (or even relevant bits)?
I suppose the answer may, indeed, be to find the "relevant bits" and only re-type them? Thoughts?
If there's anything I can clarify, please let me know.