Question

Is there an easy way to link to a webpage in rmarkdown without displaying the link?

For example, putting "https://www.google.com/" in a .rmd file renders as the entire website, but I want something analogous to <a href="https://www.google.com/">ABC</a> instead.

The html method above, i.e., <a href= ... works when I knit to html, but it does not work when I knit to a word document.

Was it helpful?

Solution

Markdown provides two ways to create a link as you mention (and I suppose that is supported on rmarkdown).

  1. Markdown way: [ABC](http://example.com)
  2. HTML way: <a href="http://example.com">ABC</a> The first way is native and the second way is supported since Markdown allows every HTML code.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top