diff --git a/R/to.R b/R/to.R index 1f674f1..5760792 100644 --- a/R/to.R +++ b/R/to.R @@ -1,7 +1,19 @@ link <- function(url, text) { glue::glue('{text}') } - +#' Create a link to a function or a package +#' +#' @param topic topic +#' @param package package +#' +#' @examples +#' link::to +#' \dontrun{ +#' link::to(dplyr::summarise) +#' link::to(package = "dplyr") +#' link::to("gather", package = "tidyr") +#' } +#' #' @importFrom rlang is_string is_call enexpr #' @importFrom cli cli_abort #' @export diff --git a/man/to.Rd b/man/to.Rd new file mode 100644 index 0000000..584ce7a --- /dev/null +++ b/man/to.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/to.R +\name{to} +\alias{to} +\title{Create a link to a function or a package} +\usage{ +to(topic, package) +} +\arguments{ +\item{topic}{topic} + +\item{package}{package} +} +\description{ +Create a link to a function or a package +} +\examples{ +link::to +\dontrun{ + link::to(dplyr::summarise) + link::to(package = "dplyr") + link::to("gather", package = "tidyr") +} + +}