How do I add a URL to R markdown?

Jennifer Liu picture Jennifer Liu · Apr 22, 2015 · Viewed 66.6k times · Source

I want to refer a URL link to the R markdown and I already tried the input such as "addlink" or "address <- ...." Both of them do not work. How can I add a link in R markdown?

Thanks!

EDIT: op's code from comment was

   {r} [linked phrase] (www.bit.ly/1EqAdIp)

Answer

Umaomamaomao picture Umaomamaomao · Apr 22, 2015

Noting @Hao's answer below, that this must be in the main text, not within a code block:

From this fabulous resource

[I'm an inline-style link](https://www.google.com)

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

[I'm a reference-style link][Arbitrary case-insensitive reference text]

[I'm a relative reference to a repository file](../blob/master/LICENSE)

[You can use numbers for reference-style link definitions][1]

Or leave it empty and use the [link text itself]

Some text to show that the reference links can follow later.

[arbitrary case-insensitive reference text]: https://www.mozilla.org
[1]: http://slashdot.org
[link text itself]: http://www.reddit.com