r-lib / roxygen2

Generate R package documentation from inline R comments
https://roxygen2.r-lib.org
Other
593 stars 234 forks source link

Documentation for roxygen2::load() is incorrect / out of date #1136

Closed pbreheny closed 2 years ago

pbreheny commented 4 years ago

I have a package for which I would like to use load_source() instead of the default load_pkgload(). According to the documentation:

You can change the default strategy for your function with roxygen2 load option.
Override the default off pkgload to use the source or installed strategies:

RoxygenNote: list(load = "source")

However, this does not actually seem to work:

Error: invalid version specification ‘list(load = "source")’

I realize that this can be specified in a call to roxygenize(), but is there a way to specify this via the DESCRIPTION file so that it works with, say, the Ctrl + Shift + D shortcut in Rstudio and other automated scripts?

gaborcsardi commented 4 years ago

It should be:

Roxygen: list(load = "source")

like in roxygen2 itself: https://github.com/r-lib/roxygen2/blob/c73def498f29783044fe50865f22c2482f80942d/DESCRIPTION#L61

pbreheny commented 4 years ago

Ah ha...yep, that works -- thanks!

lorenzwalthert commented 2 years ago

I think this was closed with https://github.com/r-lib/roxygen2/pull/1194.