How to create contents list in R markdown, of the headings/chunks

Hi,

I have a long script, with code chunks and text. The chunks have titles, and the text has headings.
Is there a way to create a sort of contents list at the start of my code, so I can see what I have without scrolling down? This is not an attempt to make a contents list in the mardown HTML file, but rather in studio itself.

For example:

Sentiment analysis explanation

here is some written text about sentiment analysis

```{r sentiment_code, echo=FALSE, results=FALSE}
# writing code in this chunk

Would have a contents list:

-Sentiment analysis explanation
-sentiment_code

Thanks!

1 Like

In Rstudio Editor you can have access

  • on the rigth to an overview on the content based on markdown Headers
  • at the bottom, an overview of chunks based on labels.

Is this the type of things you are looking for ?

1 Like

Yes, this is perfect! I Knew about the bit at the bottom, but not the part on the right! Thank you so much!!!

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.