rio icon indicating copy to clipboard operation
rio copied to clipboard

Better support for enhancing packages e.g. `ledger`

Open chainsawriot opened this issue 10 months ago • 3 comments

ledger by @trevorld has support for rio, even though it is not in rio's Suggests. And of course, the code is not in this package. Currently, rio raises error with this message

https://github.com/gesistsa/rio/blob/067a0ae805fdd96816fe9103af9f1843df3584a2/R/extensions.R#L23

A better approach for this is to first check for installation using .check_pkg_availability. If it's available, library() that package (or test with directly using the S3 method) and then import again. If it is not available, error the same way and suggest installing that package.

It can also be documented in the Vignette as a possible way to expand rio #320 .

@trevorld if you are reading this, you can put rio in Enhances.

chainsawriot avatar Sep 03 '23 14:09 chainsawriot