Title: | Hyperlink Automatic Detection |
---|---|
Description: | Automatic detection of hyperlinks for packages and calls in the text of 'rmarkdown' or 'quarto' documents. |
Authors: | Romain François [aut, cre], tada.science [cph, fnd] |
Maintainer: | Romain François <[email protected]> |
License: | MIT + file LICENSE |
Version: | 2024.4.0.9000 |
Built: | 2024-11-11 05:00:05 UTC |
Source: | https://github.com/tadascience/link |
Setup automatic linking
auto(type = c("tooltip", "plain"), keep_braces = TRUE, keep_pkg_prefix = TRUE) to_pkg(pkg, type = c("tooltip", "plain"), keep_braces = TRUE, ...) to_call(call, type = c("tooltip", "plain"), keep_pkg_prefix = TRUE, ...)
auto(type = c("tooltip", "plain"), keep_braces = TRUE, keep_pkg_prefix = TRUE) to_pkg(pkg, type = c("tooltip", "plain"), keep_braces = TRUE, ...) to_call(call, type = c("tooltip", "plain"), keep_pkg_prefix = TRUE, ...)
type |
"plain" for plain links, "tooltip" for adding a tooltip |
keep_braces |
Should the braces be kept ? |
keep_pkg_prefix |
Should the package prefix be kept ? |
pkg |
package name |
... |
See |
call |
Function call of the form |
to_pkg()
and to_call()
return text to include in html documents
## Not run: # auto is mostly meant to be called inside rmarkdown or quarto documents auto() auto(keep_braces = FALSE, keep_pkg_prefix = FALSE) # manually generate the tooltips for {pkg} and pkg::fun() link::to_pkg("tidyverse") link::to_pkg("tidyverse") link::to_call("dplyr::summarise()") link::to_call("dplyr::summarise()") ## End(Not run) link::to_pkg("tidyverse", type = "plain") link::to_call("dplyr::summarise()", type = "plain")
## Not run: # auto is mostly meant to be called inside rmarkdown or quarto documents auto() auto(keep_braces = FALSE, keep_pkg_prefix = FALSE) # manually generate the tooltips for {pkg} and pkg::fun() link::to_pkg("tidyverse") link::to_pkg("tidyverse") link::to_call("dplyr::summarise()") link::to_call("dplyr::summarise()") ## End(Not run) link::to_pkg("tidyverse", type = "plain") link::to_call("dplyr::summarise()", type = "plain")