Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Using Roxygen template tags to document parameters used in multiple functions #311

@k-doering-NOAA

Description

@k-doering-NOAA

In r4ss, the same parameters are often used across several functions (for example, see the common parameters in SS_readctl(), SS_readctl_3.30, and SS_readctl_3.24). It may be helpful to use template tags (see this stack overflow thread) to define parameters instead of adding @param some_param description for each function that uses the parameter. For example, one template file (say ctltemp.R) could be created that contains all the common parameters across the SS_readctl functions. Then, in the R oxygen header lines where the functions themselves are defined, @template ctltemp can be called instead of writing out each parameter name and its definition.

This is probably low priority and doesn't improve the functionality of r4ss, but it may make managing documentation simpler in the future. Also, if there is a better way to do this, or if there are good reasons to leave the Roxygen header lines as-is, please comment on this issue.

One reason I could think of to leave it the way it is is that some developers may not know about template tags or where to find the templates, and it may appear to them that there are parameters missing documentation in the Roxygen header lines, or at the very least they can't easily glance at the uncompiled documentation and determine if it should be updated or not.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions