renumChunks: Renumber all the code chunks in an Sweave/Knitr file or an R...

View source: R/renumChunks.R

renumChunksR Documentation

Renumber all the code chunks in an Sweave/Knitr file or an R Markdown file

Description

Given all the chunks a sequential unique ID

Usage

renumChunks(fi, dummyRun = TRUE, backup = TRUE, knitr = TRUE, labelStub = NULL)

Arguments

fi

an object of class fileInfo. See setFileNames.

dummyRun

if FALSE then the changes will be committed to disk as well as being displayed on screen. It is a good idea to do a dummy run first.

backup

if TRUE and dummyRun is FALSE then a backup file will be created with sequential numbering to stop over-writing existing backups.

knitr

if TRUE then knitr style code chunks are expected otherwise R Markdown code chunks are expected.

labelStub

used for specifying a bespoke label stub for each label. If it is not specified (default) then RC- and the handout number are used.


jmcurran/s20xHelpR documentation built on Jan. 27, 2023, 4:43 p.m.