Skip to contents

Inline hook for knitr to paste human-readable numbers and nice lists.

Usage

inline_hook(x)

Arguments

x

just about anything

Value

a string where each element in x is separated by a comma and numbers are in a human-readable format.

Author

Kelly Sovacool sovacool@umich.edu

Pat Schloss pschloss@umich.edu

Examples

inline_hook(c(1.2993992, 0.03, 1000))
#> [1] "1.3, 0.03, and 1,000"
inline_hook(c("cats", "dogs"))
#> [1] "cats and dogs"