format_value {formatters} | R Documentation |
Converts a (possibly compound) value into a string using the format
information
Description
Converts a (possibly compound) value into a string using the format
information
Usage
format_value(x, format = NULL, output = c("ascii", "html"), na_str = "NA")
Arguments
x |
( |
format |
( |
output |
( |
na_str |
( |
Details
A length-zero value for na_str
will be interpreted as "NA"
.
Value
Formatted text representing the cell x
.
See Also
Examples
x <- format_value(pi, format = "xx.xx")
x
format_value(x, output = "ascii")
# na_str works with multiple values
format_value(c(NA, 1, NA), format = "xx.x (xx.x - xx.x)", na_str = c("NE", "<missing>"))
[Package formatters version 0.5.10 Index]