separate_chunks: Separate chunks within Rmd and Rnw contents

View source: R/transform-code.R

separate_chunksR Documentation

Separate chunks within Rmd and Rnw contents

Description

Identifies and separates the code and text chunks (the latter includes non-R code) within an Rmd or Rnw file, and returns these separately.

Usage

separate_chunks(lines, filetype)

Arguments

lines

A character vector of lines from an Rmd or Rnw file.

filetype

A string indicating the filetype - either 'Rmd' or 'Rnw'.


styler documentation built on Aug. 29, 2023, 5:10 p.m.