t_dsm: Swap the Rows and Columns of a DSM Object (wordspace)

Description Usage Arguments Value Author(s) See Also Examples

Description

Given a distributional model x, t(x) returns a new DSM object representing the transposed co-occurrence and/or score matrix. Marginal frequencies and other row/column information are updated accordingly.

Usage

1
2
## S3 method for class 'dsm'
t(x)

Arguments

x

an object of class dsm

Value

A dsm object with rows and columns swapped.

Author(s)

Stefan Evert (http://purl.org/stefan.evert)

See Also

dsm

Examples

1
2
3
4
5
tdm <- DSM_TermContext # term-document model
tdm$M

dtm <- t(tdm) # document-term model
dtm$M

wordspace documentation built on Jan. 9, 2020, 1:08 a.m.