Skip to contents

These functions are expect to work with R Markdown's inline R chunk syntax `r `, such that, for instance, they are numbered `r inline(1:3)` respectively results in they are numbered 1, 2, and 3 respectively.

Usage

inline(x, sep = ", ", last_sep = ", and ", two_sep = " and ")

inline_zh(x, sep = "、", last_sep = "、", two_sep = " 與 ")

Examples

inline(1:2)
#> [1] "1 and 2"
inline(1:3)
#> [1] "1, 2, and 3"
inline_zh(1:2)
#> [1] "1 與 2"
inline_zh(1:3)
#> [1] "1、2、3"