codes {dembase} | R Documentation

## Extract the codes used by a concordance.

### Description

Extract the codes for one of the classifications used by an object of class `Concordance`.

### Usage

    codes(object, classification)

    ## S4 method for signature 'Concordance'
    codes(object, classification)

### Arguments

`object` | Object of class `Concordance`.
`classification` | Name of a classification.

### Value

A character vector.

### See Also

Names of classifications can be extracted or changed using `classifications`.

### Examples

    x <- data.frame(code = 1:3,
                    descriptor = c("North Island", "South Island",
                                   "Stewart Island"))
    x <- Concordance(x)
    x
    codes(x, classification = "code")
    codes(x, classification = "descriptor")

    x <- data.frame(sex1 = c("girl", "boy", "woman", "man"),
                    sex2 = c("female", "male"))
    x <- Concordance(x)
    x
    codes(x, classification = "sex1")
    codes(x, classification = "sex2")

[Package dembase version 0.0.0.119 Index]