extractRchunk: Extract code chunks from an .org file

View source: R/extractRchunk.R

extractRchunkR Documentation

Extract code chunks from an .org file

Description

Collect code chunks from an .org file and put them into an .R file.

Usage

extractRchunk(
  file,
  newfile = NULL,
  header = NULL,
  sep.header = NULL,
  sep.start.SRC = NULL,
  sep.end.SRC = NULL,
  rm.export.none = TRUE,
  rm.noexport = TRUE,
  index.chunk = TRUE,
  overwrite = FALSE
)

Arguments

file

[character] name of the file from which the R chunks should be extracted.

newfile

[character] name of the R file be created.

header

[character vector] optional additional strings to be added at the beginning of the file.

sep.header

[character] string indicating headers.

sep.start.SRC

[character] string indicating the start of a code block.

sep.end.SRC

[character] string indicating the end of a code block.

rm.export.none

[logical] should chunks of code with :export none be ignored?

rm.noexport

[logical] should header with :noexport: be ignored?

index.chunk

[logical] should the code block be numbered in the .R file?

overwrite

[logical] Can the existing R file be overwritten?


bozenne/butils.base documentation built on May 13, 2024, 12:20 p.m.