nsf_wordcloud: Text wordcloud

Description Usage Arguments Details Examples

View source: R/rnsf.R

Description

Create a wordcloud of text. This excludes common English words ("the", "and") but you can add your own to exclude as well. This uses the wordcloud package for plotting, and you can pass other arguments to that to make the plot prettier (see ?wordcloud::wordcloud) This follows the advice from http://www.sthda.com/english/wiki/text-mining-and-word-cloud-fundamentals-in-r-5-simple-steps-you-should-know on making a word cloud

Usage

1
2
3
4
5
6
nsf_wordcloud(
  text = nsf_get_all()$abstractText,
  prune_words = c("will", "nfs"),
  max_words = 500,
  ...
)

Arguments

text

A vector of text (for example, from grants$abstractText)

prune_words

Other words you want to prune before plotting

max_words

How many words at most to plot (it picks the most frequent ones)

...

Arguments to the wordcloud function

Details

Make a word cloud of all the interesting words

Examples

1
2
data(grants)
nsf_wordcloud(grants$abstractText[1:10])

bomeara/rnsf documentation built on Sept. 7, 2020, 11:12 a.m.