template: template

templateR Documentation

template

Description

Each line of a code template consists of condition based on the unnamed parameters and R code in which replacements with named parameters done.

Usage

template(text, ...)

Arguments

text

a code template

...

further parameters

Value

a character vector

Examples

template("
1:   'Hello {{letter}}'
!1:  'Good-bye {{letter}}'
         ",
         letter=sample(LETTERS, 1),
         runif(1)<0.5 #1 = first unnamed parameter
         )

sigbertklinke/smvgraph documentation built on Dec. 10, 2022, 9:13 a.m.