naInContext {MIfuns} | R Documentation |
Display rows of data with missing values, as well as other rows with the same key.
naInContext(x, context, search)
x |
A data.frame. |
context |
Character vector of column names representing a key. |
search |
Character vector of column names representing search fields. |
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.
A data.frame.
Tim Bergsma
help
,
test <- Theoph test$conc[[5]] <- NA naInContext(test, context="Subject", search="conc")