Displaying 1 to 1 from 1 results

valaddin - Functional input validation to make R functions more readable and robust

  •    R

Dealing with invalid function inputs is a chronic pain for R users, given R's weakly typed nature. valaddin provides pain relief—a lightweight R package that enables you to transform an existing function into a function with input validation checks, in situ, in a manner suitable for both programmatic use and interactive sessions. You can be more confident your function works correctly, when you know its arguments are well-behaved. But when they aren't, its better to stop immediately and bring them into line, than to let them pass and wreak havoc, exposing yourself to breakages or, worse, silently incorrect results. Validating the inputs of your functions is good defensive programming practice.