Learn R Programming

shapeNA (version 0.0.2)

print.naBlocks: Print Missingness Pattern

Description

Print the pattern of missingness in the supplied data, as a block matrix. Observed data are represented by 1, missing values by 0.

Usage

# S3 method for naBlocks
print(x, ...)

Arguments

x

An naBlocks object.

...

Additional parameters passed to print.

Value

A named matrix representing the missingness pattern of the data.

Details

The first row shows the column names. The leftmost column, without column name, shows the number of rows per block and the rightmost column with name # shows the number of observed variables in the block.

Examples

Run this code
# NOT RUN {
    x <- mvtnorm::rmvt(100, toeplitz(seq(1, 0.1, length.out = 3)), df = 5)
    y <- mice::ampute(x, mech='MCAR')$amp
    res <- classicShapeNA(y)
    print(res$naBlocks)
# }

Run the code above in your browser using DataLab