Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a table of contents in an r notebook

Tags:

r

rnotebook

There doesn't seem to be a problem when I add a table of contents to an r markdown file but nothing happens when I add this to an r notebook:

output: 
   html_document:
   html_notebook:
      toc: true
      depth: 3
      theme: united

Is it possible to add a table of contents to an R notebook or do I have to make this into a markdown file too?

like image 372
GR1818 Avatar asked Aug 22 '17 19:08

GR1818


2 Answers

I had to format it like this in the end:

output: 
  html_notebook:
    theme: united
    toc: yes
like image 148
GR1818 Avatar answered Sep 22 '22 18:09

GR1818


Try formatting like this:

title: "Title"
output:
  html_notebook:
    theme: united
    toc: yes
like image 24
Russell Shepherd Avatar answered Sep 25 '22 18:09

Russell Shepherd