anti_purl: Extracts contents of an R Markdown or Quarto file

View source: R/anti_purl.R

anti_purlR Documentation

Extracts contents of an R Markdown or Quarto file

Description

This function extracts the prose from a file and optionally copies it to the clipboard. In this way, it is the opposite of the purl function.

Usage

anti_purl(file_path, clip = FALSE)

Arguments

file_path

The path to the file.

clip

Logical value indicating whether to copy the prose to the clipboard. Default is FALSE.

Value

If clip is FALSE, the function returns the extracted prose. If clip is TRUE, the function copies the prose to the clipboard.

Examples

## Not run: 
anti_purl("/path/to/file.Rmd", clip = TRUE)

## End(Not run)

francojc/francojcr documentation built on Feb. 1, 2024, 9:56 p.m.