format_NA: Transforms one matrix/data.frame have the same NA entries as...

Description Usage Arguments Value

Description

Useful for reproducing observed NA patterns in simulated data. If q = (nrow(data) / nrow(NA_pattern) is an integer greater than 1, will replicate NA_pattern as kronecker(as.matrix(NA_pattern), rep(1, q).

Usage

1
format_NA(data, NA_pattern = NULL)

Arguments

data

the matrix/data.frame into which to write NA entries.

NA_pattern

the matrix/data.frame from which to write NA entries.

Value

a data.frame/matrix similar to data that includes all the NA entires as NA_pattern. If NA_pattern == NULL, the data.frame/matrix is returned unaltered.


peterhalpin/BearShare documentation built on May 25, 2019, 12:48 a.m.