问题
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.
回答1:
Markdown provides two ways to create a link as you mention (and I suppose that is supported on rmarkdown).
- Markdown way:
    [ABC](http://example.com)
- 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.
来源:https://stackoverflow.com/questions/25024224/linking-to-url-with-rmarkdown-using-knit-word-in-rstudio