codesAmbiguous {dembase} | R Documentation

## Test whether codes in a concordance have fixed meanings.

### 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

    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

    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)

[Package dembase version 0.0.0.119 Index]