© Thomas Mailund 2022
T. MailundBeginning Data Science in R 4https://doi.org/10.1007/978-1-4842-8155-0_14

14. Testing and Package Checking

Thomas Mailund1  
(1)
Aarhus, Denmark
 

Without testing, there is little guarantee that your code will work at all. You probably test your code when you write it by calling your functions with a couple of chosen parameters, but to build robust software, you will need to approach testing more rigorously. And to prevent bugs from creeping into your code over time, you should test often. Ideally, you should check all your code anytime you have made any changes to it.

There are different ways of testing software—software testing is almost a science in itself—but the kind of testing we do when we want to make sure that ...

Get Beginning Data Science in R 4: Data Analysis, Visualization, and Modelling for the Data Scientist now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.