Skip to contents

Format Configuration

Usage

fmt_config(format = NULL, na_str = "NA", align = "center")

Arguments

format

character(1) or function. A format label (string) or formatter function.

na_str

character(1). String that should be displayed in place of missing values.

align

character(1). Alignment values should be rendered with.

Value

An object of class fmt_config which contains the following elements:

  • format

  • na_str

  • align

Examples

fmt_config(format = "xx.xx", na_str = "-", align = "left")
#> An object of class "fmt_config"
#> Slot "format":
#> [1] "xx.xx"
#> 
#> Slot "format_na_str":
#> [1] "-"
#> 
#> Slot "align":
#> [1] "left"
#> 
fmt_config(format = "xx.xx - xx.xx", align = "right")
#> An object of class "fmt_config"
#> Slot "format":
#> [1] "xx.xx - xx.xx"
#> 
#> Slot "format_na_str":
#> [1] "NA"
#> 
#> Slot "align":
#> [1] "right"
#>