| whichDif | R Documentation |
This function takes a two-row data.frame and determines which cells differ.
For example, say you've got a data.frame of all the subjects in your study
and one subject is listed twice, even after you type unique(MyDF).
There are dozens of columns in MyDF, so finding the columns that
differs would be tedious. This function will do that for you.
whichDif(x, ignore.na = TRUE)
x |
A two-row data.frame |
ignore.na |
TRUE or FALSE for whether to ignore NA values. Default is
TRUE. If |
a character vector of the column names where value differ
data(Pets)
whichDif(Pets[Pets$Name == "Eddie", ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.