Learn R Programming

rankdifferencetest (version 2025.12.4)

tidy.rdt: Coerce to a data frame

Description

Coerce objects to a 'tibble' data frame in the style of broom::tidy().

Usage

# S3 method for rdt
tidy(x, ...)

# S3 method for srt tidy(x, ...)

# S3 method for rdpmedian tidy(x, ...)

# S3 method for pmedian tidy(x, ...)

Value

tbl_df

Arguments

x

Objects returned by:

  • rdt() or rdt2()

  • srt() or srt2()

  • rdpmedian() or rdpmedian2()

  • pmedian() or pmedian2()

...

Unused arguments.

Examples

Run this code
#----------------------------------------------------------------------------
# tidy() examples
#----------------------------------------------------------------------------
library(rankdifferencetest)

# Use example data from Kornbrot (1990)
data <- kornbrot_table1

rdt(
  data = data,
  formula = placebo ~ drug,
  conf_level = 0.95,
  alternative = "two.sided",
  distribution = "asymptotic",
  zero_method = "wilcoxon",
  correct = FALSE
) |>
  tidy()

rdpmedian(
  data = data,
  formula = placebo ~ drug,
  conf_level = 0.95
) |>
  tidy()

Run the code above in your browser using DataLab