labelrstudiornw

naming of sections in Rnw script in rstudio


In standard R scripts, sections can be labelled by adding four dashes after a comment. E.g.

# simple math ----
1+1

looks like this:

script with label

how can I label sections in a Rnw script? Four dashes don't work here. See:

script without label


Solution

  • The solution should be the following one:

    <<section-label-name>>=
    //code
    @
    

    Regards,

    J_F