Learn R Programming

visOmopResults (version 1.0.2)

formatEstimateValue: Formats the estimate_value column

Description

Formats the estimate_value column of <summarised_result> object by editing number of decimals, decimal and thousand/millions separator marks.

Usage

formatEstimateValue(
  result,
  decimals = c(integer = 0, numeric = 2, percentage = 1, proportion = 3),
  decimalMark = ".",
  bigMark = ","
)

Value

A <summarised_result>.

Arguments

result

A <summarised_result>.

decimals

Number of decimals per estimate type (integer, numeric, percentage, proportion), estimate name, or all estimate values (introduce the number of decimals).

decimalMark

Decimal separator mark.

bigMark

Thousand and millions separator mark.

Examples

Run this code
result <- mockSummarisedResult()

result |> formatEstimateValue(decimals = 1)

result |> formatEstimateValue(decimals = c(integer = 0, numeric = 1))

result |>
  formatEstimateValue(decimals = c(numeric = 1, count = 0))

Run the code above in your browser using DataLab