Learn R Programming

wordspace (version 0.2-8)

dimnames.dsm: Dimnames of a DSM Object (wordspace)

Description

Retrieve or set the dimnames of the co-occurrence and/or score matrix represented by a DSM object.

Usage

# S3 method for dsm
dimnames(x)
# S3 method for dsm
dimnames(x) <- value

Value

The dimnames() of a DSM object are always a list of length 2, consisting of two character vectors with row and column labels, respectively.

Arguments

x

an object of class dsm

value

a list of two character vectors with new row and column names for x. Both vectors must have appropriate length and may not be NULL.

Author

Stephanie Evert (https://purl.org/stephanie.evert)

Details

This method automatically checks that the row and column names of the co-occurrence and/or score matrix are consistent with the target terms and features listed in the row/column information tables.

See Also

dsm, check.dsm, dim.dsm

Examples

Run this code
rownames(DSM_TermContext)
colnames(DSM_TermContext)

tmp <- DSM_TermContext
rownames(tmp)[3] <- "pet"
head(tmp, 4, 6)

Run the code above in your browser using DataLab