Hi!
I am writing a script in rmarkdown to generate a report with the outcome. As I am using rmarkdown syntax, when I open "Outline" sheet in RStudio I get the outline as it is going to be reported. I find this useful, but I would also like to be able to see an outline just for the code.
Imagine this is my rmarkdown script:
---
title: "Untitled"
author: "Me"
date: "`r Sys.Date()`"
output: html_document
---
# 1. Introduction
# 2. Results
<!---
# 1. Code 1 ----
--->
"```{r}"
somecode
"``` "
"```{r}"
someOthercode
"```"
<!---
# 2. Code 2 ----
--->
"```{r}"
someOthercode2
"```"
<!---
# 2. Code 3 ----
--->
"```{r}"
someOthercode3
"```"
## 2.1 Variable A
<!---
## 3.1 Specific Code 3A
--->
"```{r}"
someOthercode3A
"```"
## 2.2 Variable B
<!---
## 3.1 Specific Code 3B
--->
"```{r}"
someOthercode3B
"```"
When I click in Outline cell in RStudio, I get the following outline:
1. Introduction
2. Results
2.1 Variable A
2.2 Variable B
Is there any way to indicate R that I want to interpret also another outline following R syntax, so, in the example before, I could get the following?:
1. Code 1
2. Code 2
3. Code 3
3.1 Specific Code 3A
3.2 Specific Code 3B
Thanks!