create_phraseclouds: Create wordclouds with phrases from selected columns

Description Usage Arguments Details

View source: R/create_phrasecloud.R

Description

This function creates a phrasecloud for each selected text column. Phraseclouds can be wordclouds, if the phrase length was set as 1, but can also be n-grams– phrases with length of "n" words. Several optional parameters give control over how many phrases are rendered in the phrasecloud. Each has a reasonable default setting to start.

Usage

1
2
3
create_phraseclouds(data, cols = selected_cols, min_occur = 3,
  min_phrases = 25, pct_phrases = 1, max_phrases = 100,
  remove_stop = TRUE)

Arguments

data

Data frame with tidied, unnested phrases

cols

List of column(s) to be unnested

min_occur

Number of times a phrase must occur to be included

min_phrases

Force the phrasecloud to include at least this many phrases

pct_phrases

Only show top "n" percent of phrases in phrasecloud

max_phrases

Maximum number of phrases to show in phrasecloud

remove_stop

Do you want to remove common "stop-words"? Applies only to single-word phrases ("unigrams"). If so, use TRUE

Details

It requires a data frame with specific columns. The easiest way to create this is with tidy_verbatim().

It's recommended that you select your columns into a vector outside of the function call. This is then passed into both tidy_verbatim() and create_phrasecloud().


chrisumphlett/openEndedAnalyzeR documentation built on Dec. 25, 2019, 4:10 p.m.