Hyperlink in R document

11k Views Asked by At

I am writing an R document (Rd) for functions. In markdown, we can create a hyperlink by [google](https://www.google.com). How can I replicate this in R document?

It seems that \link{...} can only create a link, which is different from what I am looking for.

1

There are 1 best solutions below

1
On BEST ANSWER

The link{} macro is to link to other documentation pages.

You can use the \href{}{} macro to include a link to another webpage, where the text displayed is not the link.

Example:

\href{http://stackoverflow.com/}{Stack Overflow}

In addition to the official R documentation for package development, you can also read the "Object Documentation" section of Hadley's "R Packages" book.