RStudio document outline

485 Views Asked by At

I have tried using the document outline feature in RStudio, but it's not indenting the way I expected it to. I'm curious if there's a way to achieve the desired output.

Reproducible example below:

#A----
##a1----

##a2----
function1 <- function(){}

#B----
##b1----
function2 <- function(){}

##b2----

example shows:

A
 a1
 a2
  function1
  B
 b1
  function2
   b2

I would like the outline to look like this:

A
 a1
 a2
  function1
B
 b1
  function2
 b2

I am using RStudio 2023.06.0+421, R version 4.3.1 on Mac OS 12.6. Could you please help me identify what I am doing incorrectly and provide guidance on how to resolve this issue?

0

There are 0 best solutions below