Abstract
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 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 make any changes to it.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
I know that a rectangle doesn’t have to have sides parallel with those two dimensions, but there is no need to make the example more complicated than it has to be.
- 2.
If there are, you should have a look at .Rbuildignore. If you have a file just the place you want it but the check is complaining, you can just add the filename to .Rbuildignore and it will stop complaining. If you have a README.Rmd file, for example, it will probably complain, but then you can add a line to .Rbuildignore that says ^README.Rmd$.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2017 Thomas Mailund
About this chapter
Cite this chapter
Mailund, T. (2017). Testing and Package Checking. In: Beginning Data Science in R. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2671-1_12
Download citation
DOI: https://doi.org/10.1007/978-1-4842-2671-1_12
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-2670-4
Online ISBN: 978-1-4842-2671-1
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)