get_doc_terms: View term scores for a given document

View source: R/feature_preparation.r

get_doc_termsR Documentation

View term scores for a given document

Description

View term scores for a given document

Usage

get_doc_terms(dtm, docname = NULL, doc_i = NULL)

Arguments

dtm

A quanteda dfm

docname

name of document to select

doc_i

alternatively, select document by index

Value

A named vector with terms (names) and scores

Examples

get_doc_terms(rnewsflow_dfm, doc_i=1)

RNewsflow documentation built on May 31, 2023, 6:53 p.m.