Hi @sten,
You can't have nested folding in an R script (You can in RMarkdown, so consider that as an alternative). So if you wan to use an R script, you should allow the top-level label to be a section, and everything in that section to simply be a comment. For example:
# Tables ----
# Table 1
...R code...
# Table 2
...R code...
# Figures ----
# Figure 1
... R code...
This will allow you to fold Tables and Figures, and all the code within those sections will be contained in that fold.
In R Markdown, you use H1, H2, H3, etc tags for nested folding:
---
output: html_document
---
# Tables
## Channel 1
### Table 1
```{r}
...R code...
```
### Table 2
### Table 3
## Channel 2
### Table 1
### Table 2
### Table 3
## Channel 3
### Table 1
### Table 2
### Table 3