Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R anchors in markdown

Tags:

r

knitr

In creating a Rmd file I included an internal hyperlink:

   [hlink](#id1)  

and then further on an anchor

<a id="id1"></a> . 

When I then use Knit HTML (in RStudio) everything works fine and the internal hyperlink works fine but I also get an unwanted �

<p><a id="id1"></a>�</p>

How can I avoid getting this error?

like image 574
adam.888 Avatar asked Aug 30 '12 19:08

adam.888


1 Answers

I was just looking for a solution to produce a table of content and came across your question.

The above example works perfectly fine. No unwanted side effects.

My session info: R version 2.15.3 (2013-03-01) knitr_1.1

Just wanted to mention that, incase somebody else comes across this question.

like image 79
tim Avatar answered Oct 23 '22 02:10

tim