Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a URL to R markdown?

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) 
like image 562
Jennifer Liu Avatar asked Apr 22 '15 04:04

Jennifer Liu


People also ask

How do I add a header in R Markdown?

We can insert headings and subheadings in R Markdown using the pound sign # . There are six heading/subheading sizes in R Markdown. The number of pound signs before your line of text determines the heading size, 1 being the largest heading and 6 being the smallest.

How do I add text in R Markdown?

Rmd file, you may now add text to your document. You may start with the most basic word processing—simply typing your text below the YAML header section. If you want to start a new paragraph, you can simply hit Enter twice on your key- board, and begin writing again.


2 Answers

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 
like image 142
Scransom Avatar answered Sep 21 '22 22:09

Scransom


If you are using shiny, all you need to do is at the markup (white) area:

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

This way you enter the hyperlink at the text(=markup) and not the interactive portion(~R) of your page.

like image 40
DrRDN Avatar answered Sep 20 '22 22:09

DrRDN