marcusyoung / opentripplanner

An API wrapper for OpenTripPlanner (OTP) as an R package
11 stars 5 forks source link

Error checking using checkmate #16

Closed marcusyoung closed 5 years ago

marcusyoung commented 6 years ago

Hi,

I'd like to standardise on using checkmate package for argument checking. See link below for list of checks, which include File IO and OS checks amongst many more:

https://mllg.github.io/checkmate/reference/checkmate-package

I have used it for checks in the otp_connect() function as an example. One very good aspect as you'll see from that code is the ability to put the checks in collections, so only a single composite message is returned to the user if there are multiple problems. In addition the code is much cleaner.

Marcus

Robinlovelace commented 6 years ago

Looks good - a decent package. stopifnot() is a base R option with less features.