TOC or Side Menu in Rpubs

rpubs

#1

Hi all,

New to everything R and have Knited to HTML and published to Rpubs.

On a couple of searches I saw that some people had side menus within their Rpubs that looked like this:

image

However when I tried to create a side menu or a TOC it looks as follows:

image

In my.Rmd I have the following:
output:
html_document
toc: yes

My question is, how can I get my side menu or TOC to be displayed like the first image?
Any help would be appreciated. Thank you!


#2

You need true rather than yes, as well as the identation:

output: 
  html_document:
    toc: true
    toc_float: true


#3

Thanks Martin.

Unfortunately when I republished to Rpubs, I am still not seeing a side menu:

image
image


#4

can you try to indent the yaml as in @martin.R example ?

yaml is very sensitive to indentation and from your screenshot it seems like html_document is at same level as output so the other options may not have be taken into account.


#5

Thank you very much @martin.R for the solution and @cderv for further clarification of the solution! I appreciate your time.


#6

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: