Skip to content

Commit

Permalink
docs: #72 add guidance on default/permitted
Browse files Browse the repository at this point in the history
  • Loading branch information
Zelos Zhu committed May 18, 2023
1 parent aa34609 commit 03fdb9d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vignettes/programming_strategy.Rmd
Expand Up @@ -389,8 +389,12 @@ An example is given below:
The following fields are mandatory:

* `@param`: One entry per function argument.
The following attributes should be described: expected data type (e.g. `data.frame`, `logical`, `numeric` etc.), default value (if any), permitted values (if applicable), optionality (i.e. is this a required argument).
If the expected input is a dataset then the required variables should be clearly stated.
The following attributes should be described: expected data type (e.g. `data.frame`, `logical`, `numeric` etc.), permitted values (if applicable), optionality (i.e. is this a required argument). If the expected input is a dataset then the required variables should be clearly stated. Describing the default value becomes difficult to maintain and subject to manual error when it is already declared in the function arguments. The description for permitted values should be written as a separate line italicizing the phrase "Permitted Values", example below:

```
#' *Permitted Values*: example description of permitted values here
```

* `@details`: A natural-language description of the derivation used inside the function.
* `@keyword`: One applicable tag to the function - identical to family.
* `@family`: One applicable tag to the function - identical to keyword.
Expand Down

0 comments on commit 03fdb9d

Please sign in to comment.