sort_rmd_head: Sort an R Markdown file with specified order of headers

Description Usage Arguments Details

View source: R/sort-md.R

Description

Sort an R Markdown file with specified order of headers

Usage

1
2
sort_rmd_head(in_file, out_file = NULL, order = c("R Markdown2",
  "R Markdown"))

Arguments

order

Character vector. A list of level 2 titles in the input file which determines the order of h2 titles in the output file.

infile

String. Path to the input Rmd file.

outfile

String. Path to the output Rmd file. Defaults to NULL, which overwrites the input file.

Details

Restructure an input R Markdown file by its level 2 headers (## ). The order is determined by specifying the h2 headers in the argument order.


deeplexR/lexicoR documentation built on May 26, 2019, 2:33 a.m.