naInContext {MIfuns}R Documentation

Display Missing Values in Context

Description

Display rows of data with missing values, as well as other rows with the same key.

Usage

naInContext(x, context, search)

Arguments

x A data.frame.
context Character vector of column names representing a key.
search Character vector of column names representing search fields.

Details

Often one wants to view not just records with missing values, but other related records as well, e.g. "view all the records for any subject with missing doses". naInContext searches for NAs in columns of x named by search. It then determines keys for these rows, using columns in x named by context. Finally, it displays all rows with matching keys.

Value

A data.frame.

Author(s)

Tim Bergsma

See Also

help,

Examples

test <- Theoph
test$conc[[5]] <- NA
naInContext(test, context="Subject", search="conc")

[Package MIfuns version 3.2.9 Index]