r-lib / usethis

Set up commonly used 📦 components
https://usethis.r-lib.org/
Other
859 stars 286 forks source link

New feature: use_data_doc() for creating roxygen documentation of a dataset #1896

Closed friendly closed 3 months ago

friendly commented 1 year ago

I’ve long been miffed by the inability to document data sets in R packages using roxygen style. Just as in RStudio, you can highlight a function and select Code -> Insert roxygen skeleton, there should be something, somewhere for data sets.

I wrote and documented a new function, use_data_doc(), as a gist: https://gist.github.com/friendly/14f3ee1464213bb0b9fbcb489468383b

That was assuming it might find a place in the usethis package, perhaps with a different name.

My translation from utils::promptData() was fairly simple.

I've raised this question on the r-pkg-devel list if you want to look at that discussion.

jennybc commented 3 months ago

This is basically a duplicate of #1681, where there has already been a fair bit of discussion. So closing this in favor of #1681, but now they are linked.