Learn R Programming

quanteda (version 1.3.13)

textstat_proxy: [Experimental] Compute document/feature proximity

Description

This is an underlying function for textstat_dist and textstat_simil but returns TsparseMatrix.

Usage

textstat_proxy(x, selection = NULL, margin = c("documents",
  "features"), method = c("cosine", "correlation", "jaccard", "ejaccard",
  "dice", "edice", "hamman", "simple matching", "faith", "euclidean",
  "chisquared", "hamming", "kullback", "manhattan", "maximum", "canberra",
  "minkowski"), p = 2, min_proxy = NULL, rank = NULL)

Arguments

x

a dfm object

selection

a valid index for document or feature names from x, to be selected for comparison

margin

identifies the margin of the dfm on which similarity or difference will be computed: "documents" for documents or "features" for word/term features.

method

method the similarity or distance measure to be used; see Details.

p

The power of the Minkowski distance.

min_proxy

the minimum proximity value to be recoded.

rank

an integer value specifying top-n most proximity values to be recorded.

See Also

textstat_dist, textstat_simil