Learn R Programming

formattable (version 0.2.1)

suffix: Formattable object with suffix

Description

Formattable object with suffix

Usage

suffix(x, suffix = "", sep = "", ..., na.text = NULL)

Arguments

x

an object

suffix

a character vector put behind each non-missing value in x as being formatted.

sep

separator

...

additional parameter passed to formattable.

na.text

text for missing values in x.

Examples

Run this code
# NOT RUN {
suffix(1:10, "px")
suffix(1:10, ifelse(1:10 >= 2, "units", "unit"), sep = " ")
suffix(c(1:10, NA), "km/h", na.text = "(missing)")
suffix(percent(c(0.1, 0.25)), "*")
# }

Run the code above in your browser using DataLab