I'm trying to figure out is it possible in R to run different lines of code depending on the situation you have. In my situation we take in new data from a 3rd party and i would like to run a quality check on it at the middle point of our calculations.
I would like to do the starting calculations that I need. Then check if it fit's our needs and no irregularities are present. If it detects something then i would like to to move to lines 100-150 (calculate and print an error report) and if everything is great then go to line 151-200 and finish the calculations.
I could of course run codes separately bur since errors are rare i'm afraid that people will just skip quality checks. My plan is to make it really simple to run all the code but if an error is present then they can't get an end report. Will get an error report instead. Then they will check it.
Aucun commentaire:
Enregistrer un commentaire