print.msdata: Print Prepared Multistate Data

View source: R/prepare_data.R

print.msdataR Documentation

Print Prepared Multistate Data

Description

Prints a concise validation summary for an msdata object, including patient and interval totals and an observed-transition table in the original state-definition order. Use head() to display actual data rows.

Usage

## S3 method for class 'msdata'
print(x, ...)

Arguments

x

An msdata object returned by prepare_data().

...

Ignored.

Value

x, invisibly.

Limitations

The printout is descriptive and does not refit or revalidate a modified object. Re-run prepare_data() after changing rows or metadata.

Examples

ms <- define_multistate(c("A", "B"), "B", list(A = "B"))
dat <- data.frame(id = 1:3, x = 1:3, time_B = 1:3,
                  censor = NA_real_)
long <- prepare_data(dat, "id", ms, list(B = "time_B"), "censor", "x")
print(long)


RFmstate documentation built on Sept. 10, 2026, 1:09 a.m.