BAAQMD / BAAQMD/strtools

Examples generate errors

Open
#4 1 comment 0 reactions 1 assignee Claimed by @dholstius View on GitHub
Dominant language
R
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

One thing that R CMD check does is sequentially run all the examples in a package. If a single example fails, it reports the error and stops testing the examples. This is a useful test, and (I think) a reason to make sure that our examples do not generate errors.

However, it looks like the [last example](https://github.com/BAAQMD/strtools/blob/master/R/parse_integers.R#L17) for parse_integers is perhaps designed to fail. I handled this by wrapping the whole set of examples in a `\dontrun` block. But then it appears that the next function (str_relevel) has the same issue: the [last example](https://github.com/BAAQMD/strtools/blob/master/R/str_relevel.R#L10) throws an error. I can't be sure, but I think that this one is intentional as well.

At this point I decided to create this issue instead of wrapping the examples in a `\dontrun` or removing the last one. While I do think that having R CMD check run all the examples and report on errors is useful, it's possible you don't agree (or just weren't using / aware of this feature). If you'd like to use it, though, I recommend making sure that no examples generate errors.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.