Skip to content

Commit

Permalink
Clarify function linking (#221)
Browse files Browse the repository at this point in the history
Fixes #184
  • Loading branch information
hadley authored Oct 2, 2024
1 parent 8ddeb23 commit 31a6b01
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions documentation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ More recommendations should be organised in a bulleted list:
#' * [name-repair] documents the details of name repair.
```


You can link to functions in other packages by using the fully qualified function name, i.e. `[pkg::function()]`.

If you have a family of related functions, you can use the `@family` tag to
automatically add appropriate lists and interlinks to the `@seealso` section.
Family names are plural. In dplyr, the verbs `arrange()`, `filter()`,
Expand All @@ -141,13 +144,12 @@ When linking to external resources either include the full url inline with `<>`,

Text that contains valid R code should be marked as such using backticks. This includes:

* Function names, which should be followed by `()`, e.g. `tibble()`.
* Function arguments, e.g. `na.rm`.
* Values, e.g. `TRUE`, `FALSE`, `NA`, `NaN`, `...`, `NULL`
* Literal R code, e.g. `mean(x, na.rm = TRUE)`
* Class names, e.g. "a tibble will have class `tbl_df` ..."

Do not capitalize the function name if it occurs at the start of a sentence.
You can use code syntax for function names, like `` `tibble()` ``, but consider if it would be better to use a cross-link instead, like `[tibble()]`. If you refer to a function multiple times in one topic, you only need to link the first reference.

## Package names

Expand Down

0 comments on commit 31a6b01

Please sign in to comment.