RobinHankin / permutations

https://robinhankin.github.io/permutations/
5 stars 3 forks source link

singleword_valid() should return TRUE or FALSE #8

Closed RobinHankin closed 6 years ago

RobinHankin commented 6 years ago

but currently singleword_valid() will stop() if given invalid input. We should be able to say

if(singleword(valid)){do_stuff()}

or

stopifnot(singleword_valid(jj))

RobinHankin commented 6 years ago

also the first two examples in valid.Rd are not very well thought through.

RobinHankin commented 6 years ago

The only place that singleword_valid() is called in the package is in word(). It is entirely reasonable that word() should stop with error if called with invalid data.