Learn R Programming

rtables (version 0.5.0)

format_rcell: Format rcell

Description

This is a wrapper around formatters::format_value for use with CellValue objects

Usage

format_rcell(x, format, output = c("ascii", "html"), na_str = "NA")

Arguments

x

an object of class CellValue, or a raw value.

format

character(1) or function. The format label (string) or formatter function to apply to x.

output

character(1). output type

na_str

character(1). String that should be displayed when the value of x is missing. Defaults to "NA".

Value

formatted text representing the cell

Examples

Run this code
# NOT RUN {
cll <- CellValue(pi, format = "xx.xxx")
format_rcell(cll)
# }

Run the code above in your browser using DataLab