R/cs_get_cutoff_descriptives.R

Defines functions cs_get_cutoff_descriptives

Documented in cs_get_cutoff_descriptives

#' Get Descriptives Used In The Cutoff Calculation
#'
#' @param x A clinisig object
#'
#' @return A tibble with means and standard deviations of the clinical and
#'   functional population
#' @export
cs_get_cutoff_descriptives <- function(x) {
  if (!inherits(x, "clinisig")) cli::cli_abort("The supplied object must be of class {.code clinisig}.")
  if (!inherits(x, "cs_statistical")) cli::cli_abort("The supplied object does not contain an analysis for which population cutoffs have been calculated.")

  x[["cutoff_results"]][["info"]] |>
    as_tibble() |>
    select(-type, -value)
}

Try the clinicalsignificance package in your browser

Any scripts or data that you put into this service are public.

clinicalsignificance documentation built on April 4, 2025, 12:19 a.m.