This function works with code split into parts identified by brackets. The format is as follows:
{
...
code from part 1
...
} # part 1
{
...
} # part 2
It automatically identifies parts to fold/unfold easily.
Shortcuts required: Suggestion is to have one shortcut for this function, foldAllBr, and another one for "expand fold" command. Here are the suggested shortcuts depending on Windows or Mac :
on Mac : use ctrl+shift -> + up (fold) and down (expand)
on Win : use shift+alt -> + S (fold) and D (expand)
foldAllBr(time = FALSE, debug_getTbl = FALSE)A list containing:
debug_info: A data frame with debugging information if debug_getTbl = TRUE.
timer_plot: A ggplot object visualizing execution times if time = TRUE.
If both parameters are FALSE, the function returns a list with NULL values.
Logical. If `TRUE`, the function will return ggplot object
visualizing execution times for each step.
Logical. If `TRUE`, returns the `docContent` table with tags for debugging purposes.