classifications {dembase} | R Documentation

## Names of classifications used by concordances.

### Description

Get and set names of classifications used by objects of class `Concordance`.

### Usage

    classificationFrom(object)

    classificationFrom(object) <- value

    classifications(object)

    classifications(object) <- value

    classificationTo(object)

    classificationTo(object) <- value

    ## S4 method for signature 'ManyToOne'
    classificationFrom(object)

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

    ## S4 replacement method for signature 'Concordance'
    classifications(object) <- value

    ## S4 method for signature 'ManyToOne'
    classificationTo(object)

### Arguments

`object` | Object of class `Concordance`.
`value` | A character vector.

### Details

`classificationFrom` and `classificationTo` can only be used with concordances of class `ManyToOne`, since the idea of a 'from' classification or 'to' classification is only defined for a many-to-one concordance. `classifications` can be used with concordances of class `ManyToOne` or `OneToOne`.

`value` has length 2 with function `classifications` and length 1 with functions `classificationFrom` or `classificationTo`.

### Value

A character vector, or in the case of the replacement function, a concordance with new classification names.

### See Also

The codes from a concordance can be extracted using `codes`.

### Examples

    x <- cbind(c1 = c("a", "b", "c"), c2 = c("x", "y", "x"))
    x <- Concordance(x)
    x
    classifications(x)
    classifications(x)[1] <- "classif1"
    classifications(x)
    classificationFrom(x)
    classificationTo(x)

[Package dembase version 0.0.0.119 Index]