1st Edition

Testing R Code

By Richard Cotton Copyright 2017
196 Pages
by Chapman & Hall

196 Pages 10 B/W Illustrations
by Chapman & Hall

196 Pages 10 B/W Illustrations
by Chapman & Hall

Learn how to write R code with fewer bugs. The problem with programming is that you are always one typo away from writing something silly. Likewise with data analysis, a small mistake in your model can lead to a big mistake in your results. Combining the two disciplines means that it is all too easy for a missed minus sign to generate a false prediction that you don’t spot until it’s too... Read more

Introduction



Run-time testing with assertive



Development-time testing with testthat



Writing easily maintainable and testable code



Integrating testing into your packages



Writing your own assertions and expectations



Answers to exercises

Biography

Richard Cotton