formatEstimateName: Formats estimate_name and estimate_value column

View source: R/formatEstimateName.R

formatEstimateNameR Documentation

Formats estimate_name and estimate_value column

Description

Formats estimate_name and estimate_value columns by changing the name of the estimate name and/or joining different estimates together in a single row.

Usage

formatEstimateName(
  result,
  estimateName = NULL,
  keepNotFormatted = TRUE,
  useFormatOrder = TRUE,
  estimateNameFormat = lifecycle::deprecated()
)

Arguments

result

A ⁠<summarised_result>⁠.

estimateName

Named list of estimate name's to join, sorted by computation order. Indicate estimate_name's between <...>.

keepNotFormatted

Whether to keep rows not formatted.

useFormatOrder

Whether to use the order in which estimate names appear in the estimateName (TRUE), or use the order in the input dataframe (FALSE).

estimateNameFormat

deprecated.

Value

A ⁠<summarised_result>⁠ object.

Examples

result <- mockSummarisedResult()
result |>
  formatEstimateName(
    estimateName = c(
      "N (%)" = "<count> (<percentage>%)", "N" = "<count>"
    ),
    keepNotFormatted = FALSE
  )


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