codesAmbiguous: Test whether codes in a concordance have fixed meanings.

Description Usage Arguments Value See Also Examples

Description

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.

Usage

1
2
3
4
codesAmbiguous(object)

## S4 method for signature 'Concordance'
codesAmbiguous(object)

Arguments

object

Object of class Concordance.

Value

Logical.

See Also

The codes used by a concordances can be extracted using codes.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)

StatisticsNZ/classconc documentation built on May 9, 2019, 2:03 p.m.