Learn R Programming

quanteda (version 0.9.9-50)

as.list.dist_selection: coerce a dist_selection object into a list

Description

Coerce a dist_selection matrix into a list of selected terms and tarhet terms in descending order. Can be used after calling textstat_simil or textstat_dist when selection is not NULL

Usage

# S3 method for dist_selection
as.list(x, sorted = TRUE, n = NULL, ...)

Arguments

x
dist_selection class object
sorted
sort results in descending order if TRUE
n
the top n highest-ranking items will be returned. If n is NULL, return all items.
...
unused