charCloud: create a word cloud from a character string

View source: R/charCloud.R

charCloudR Documentation

create a word cloud from a character string

Description

this function creates a wordcloud based on a character string. Optionally, a file with common words to be excluded can be supplied. See tagcloud for details on the cloud building.

Usage

charCloud(
  txt,
  exclude = NULL,
  nwords = 180,
  min.char.length = 5,
  max.char.length = 30,
  clrs = c("#8c510a", "#bf812d", "#35978f", "#01665e", "#7fbc41", "#4d9221"),
  seed = 123,
  wmin = NULL,
  stat = FALSE,
  sortby = c("freq, names"),
  ...
)

Arguments

txt

character string from which the cloud will be computed

exclude

optional path to a .txt file with words to be excluded from the cloud

nwords

the number of words to be plotted

min.char.length

minimum length of words to be included in the cloud

max.char.length

maximum length of words to be included in the cloud

clrs

vector of colors to be used for the word cloud

seed

seed to be used for the random word placement

wmin

see tagcloud for details

stat

return statistics (words and frequencies)

sortby

if stat is TRUE, sort statistics by names or frequency

...

additional arguments passed to tagcloud

Author(s)

Tim Appelhans

See Also

tagcloud


environmentalinformatics-marburg/Rsenal documentation built on July 28, 2023, 6:09 a.m.