Learn R Programming

visOmopResults (version 1.0.2)

formatEstimateName: 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
)

Value

A <summarised_result> object.

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).

Examples

Run this code
result <- mockSummarisedResult()
result |>
  formatEstimateName(
    estimateName = c(
      "N (%)" = " (%)", "N" = ""
    ),
    keepNotFormatted = FALSE
  )

Run the code above in your browser using DataLab