head_dsm: Return the Top Left Corner of a DSM Matrix (wordspace)

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Returns the first n rows and first k columns of the co-occurrence matrix stored in a dsm object. If a scored matrix is available, it is automatically used; otherwise the raw frequencies are shown.

Usage

1
2
## S3 method for class 'dsm'
head(x, n = 6L, k = n, ...)

Arguments

x

an object of class dsm

n

a single integer specifying the number of rows to extract

k

a single integer specifying the number of columns to extract (default: same as number of rows)

...

all other arguments are silently ignored

Details

Note that in contrast to other head methods, negative values of n (and k) are not supported. There is also currently no corresponding tail method.

Value

A dense or sparse co-occurrence matrix with n rows and k columns.

Author(s)

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

See Also

head for the generic method.

Examples

1
2
3
head(DSM_TermTerm, Inf, Inf) # show full co-occurrence matrix

head(DSM_TermTerm, 3, 4)

wordspace documentation built on May 20, 2017, 12:27 a.m.

Search within the wordspace package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.