hadley / strict

Make R a little bit stricter
236 stars 10 forks source link

strict

Travis-CI Build Status CRAN\_Status\_Badge Coverage Status

The goal of strict to make R behave a little more strictly, making base functions more likely to throw an error rather than returning potentially ambiguous results.

library(strict) forces you to confront potential problems now, instead of in the future. This has both pros and cons: often you can most easily fix a potential ambiguity when you're working on the code (rather than in six months time when you've forgotten how it works), but it also forces you to resolve ambiguities that might never occur with your code/data.

Installation

# install.packages("devtools")
devtools::install_github("hadley/strict")

Features

library(strict) affects code in the current script/session only (i.e. it doesn't affect code in others packages).

Once strict is loaded, you can continue to run code in a lax manner using lax().