get_keywords: List keywords from 'scale_text'

Description Usage Arguments See Also Examples

View source: R/get_keywords.R

Description

get_keywords lists keywords for each scaled text dimension.

Usage

1
2
get_keywords(scores, n_dimensions, n_words = 15, stretch = 3,
  capture_output = FALSE, pivots_only = TRUE)

Arguments

scores

List from output of scale_text.

n_dimensions

Integer scalar or vector. How many/which dimensions to print.

n_words

An integer scalar. How many keywords for each dimension.

stretch

An integer scalar. Must be positive, odd integer. Reduce importance of pivot words in 'specific' keywords.

capture_output

A logical scalar. Whether to return the output as list of data frames rather than print to console.

pivots_only

A logical scalar. Whether to show only pivot in keywords.

See Also

read_word_embeddings, plot_keywords, score_documents, doc_to_tdm

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
scores <- scale_text(
    meta=out$meta,
    tdm=tdm
    )

get_keywords(scores, n_dimensions=3, n_words=15)

## End(Not run)

wilryh/parrot documentation built on Jan. 9, 2020, 2:16 p.m.