Learn R Programming

MAICtools (version 0.1.1)

check_matching2wider: Convert a Longer Table Generated by check_matching() Into a Wider Table

Description

Convert a Longer Table Generated by check_matching() Into a Wider Table

Value

A data frame containing the summarized results in a wider format.

Arguments

baseline.longer

A data frame containing the summarised results generated by check_matching().

intervention.arm

The name of the grouping column in the data frame specified by ipds, e.g., intervention.arm = TRT. The default is TRT.

digits

Specify the number of decimal places for the output results.

Examples

Run this code
# \donttest{
cov <- list(
  binary = c("ECOG", "SMK", "METBRAIN"),
  continuous = c("BMI", "DIAG")
)

cov_all <- list(
  binary = c("SEX", "ECOG", "SMK", "METBRAIN", "METLIVER"),
  continuous = c("BMI", "DIAG", "WEIGHT", "HEIGHT")
)

baseline <- check_matching(
  ipds_wts = pts, agds = AgD_bl,
  summary.list = cov_all, matching.list = cov,
  intervention.arm = TRT,
  comparator = STUDY, comparator.study = "Study XX-1",
  comparator.n = N, comparator.arm = TRT)

baseline_summary <- check_matching2wider(
  baseline.longer = baseline,
  intervention.arm = TRT)

baseline_summary
# }

Run the code above in your browser using DataLab