formatEstimateValue: Formats the estimate_value column

View source: R/formatEstimateValue.R

formatEstimateValueR Documentation

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 = ","
)

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.

Value

A ⁠<summarised_result>⁠.

Examples

result <- mockSummarisedResult()

result |> formatEstimateValue(decimals = 1)

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

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

visOmopResults documentation built on Sept. 24, 2024, 1:08 a.m.