Idea

Example

---
title: "Example of chunk options"
output: html_notebook
chunknames:
  combo:
    prefix: "020"
    suffix: no
    pattern:
      - adjectives
      - colors
      - [animals, shapes]
      - my_list1
    case: "lower/upper/title/sentence"
    sep: "-"
    extra: ["data/my_list1.rda", "data/my_list2.rda"]
  random:
    prefix: no
    suffix: no
    type: "hex/alpha/alphanumeric"
    case: "lower/upper/mixed"
    length: 12
  regex:
    pattern: "020-[A-Za-z]{2}-string_literal-[a-f0-9]{6}"
  regex2:
    patterns:
      - "020"
      - "[A-Za-z]{2}"
      - "string_literal"
      - "[a-f0-9]{6}"
    sep: "-"
---

The above chunknames options will produce a name with a prefix and four words (one from each list in the order specified) separated by dashes. E.g. 020-radiant-blue-fox-alive. Extra lists should probably be saved as a vector of words as an R object.

Execution

I saw it mentioned that one can convert an Rmarkdown to xml using tinkr, and then parse/manipulate using xml2. Finally transform back to Rmarkdown.

Types of names



adknudson/r-anomia documentation built on Dec. 18, 2021, 10:28 p.m.