ThinkR-open / attachment

Tools to deal with dependencies in scripts, Rmd and packages
https://thinkr-open.github.io/attachment/
Other
108 stars 13 forks source link

Take README.rmd into account for suggested packages #14

Closed denrou closed 4 years ago

denrou commented 4 years ago

Sometimes README contains examples to explain how the package is used and external packages might be needed in order to get or transform data.

Those packages should be listed as suggested packages. What do you think?

statnmap commented 4 years ago

Hi @denrou ,
Thank you for your suggestion.

The README is not a file that is included in a installed package. This means that users can not access it offline in the R-help.
I personally think that a better practice would be to double your documentation with a vignette similar to your Readme, or examples in your {roxygen2} squeleton.
Users who install the package should understand why this new dependency is needed. Here, they would have to go on the github repo of the package to be able to understand. IMHO, Readme should only be an overview of what's inside the package already.

That said, if you would like to include package from your README in the Suggests list, then you could use:

extra_suggest <- attachment::att_from_rmd("README.Rmd")
attachment::att_amend_desc(extra.suggests = extra_suggest)
denrou commented 4 years ago

You have an excellent point, I forgot that README is not included in the installed package. Your idea to make vignette based on README makes sense.

Thanks a lot.