useR!2017 has ended
Back To Schedule
Thursday, July 6 • 6:05pm - 6:10pm
Functional Input Validation with valaddin

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Keywords: input validation, type safety, defensive programming, functional programming
Webpages: https://CRAN.R-project.org/package=valaddin, https://github.com/egnha/valaddin
To cope with the everyday hazards of invalid function inputs, R provides the functions stop() and stopifnot(), which can express input requirements as show-stopping assertions. While this way of validating inputs is both straightforward and effective, its rigidity as a fixture of a function, and its tendency to clutter code, add inertia to the process of interacting and programming with data.
In this talk, we demonstrate a more nimble take on input validation using the valaddin package, which address these shortcomings by viewing input validation as a functional transformation. We explore concrete use cases to illustrate the flexibility and benefits of this alternative approach.


Thursday July 6, 2017 6:05pm - 6:10pm CEST
3.01 Wild Gallery