| codesAmbiguous {dembase} | R Documentation |
Test whether any codes in an object of class
Concordance are ambiguous. A code is ambiguous if it
appears in more than one classification, unless it only ever maps on to
itself. See below for examples.
codesAmbiguous(object) ## S4 method for signature 'Concordance' codesAmbiguous(object)
object |
Object of class |
Logical.
The codes used by a concordances can be extracted using
codes.
x <- cbind(c1 = c("a", "b", "c"), c2 = c("x", "y", "x"))
x <- Concordance(x)
## no codes found in both classifications
codesAmbiguous(x)
x <- cbind(c1 = c("a", "b", "c"), c2 = c("a", "y", "x"))
x <- Concordance(x)
## "a" found in both classifications, but maps on to itself.
codesAmbiguous(x)
x <- cbind(c1 = c("a", "b", "c"), c2 = c("x", "a", "x"))
x <- Concordance(x)
## "a" found in both classifications, mapping on to different values.
codesAmbiguous(x)