Description Usage Arguments Details Value Author(s) References Examples
Display rows of data with missing values, as well as other rows with the same key.
1 | naInContext(x, context, search)
|
x |
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 NA
s 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.
data.frame
Tim Bergsma
http://metrumrg.googlecode.com
1 2 3 | test <- Theoph
test$conc[[5]] <- NA
naInContext(test, context='Subject', search='conc')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.