plot_words: Plot a wordcloud with words ordered and coloured according to...

Description Usage Arguments Value Examples

View source: R/plot_words.r

Description

Plot a wordcloud with words ordered and coloured according to a dimension (x)

Usage

1
2
3
plot_words(x, y = NULL, words, wordfreq = rep(1, length(x)), xlab = "",
  ylab = "", yaxt = "n", scale = 2, random.y = T, xlim = NULL,
  ylim = NULL, ...)

Arguments

x

The (approximate) x positions of the words

y

The (approximate) y positions of the words

words

A character vector with the words to plot

wordfreq

The frequency of the words, defaulting to 1

xlab

Label of the x axis

ylab

Label of the y axis

yaxt

see par documentation

scale

Maximum size to scale the wordsize

random.y

if TRUE, the y position of words is random, otherwise it represents the word frequency.

xlim

Starting value of x axis

ylim

Starting value of y axis

...

additional parameters passed to the plot function

Value

nothing

Examples

1
2
3
4
5
6
7
8
x = c(-10, -5, 3, 5)
y = c(0, 2, 5, 10)
words = c('words', 'where', 'you', 'like')

## Not run: 
plot_words(x,y,words, c(1,2,3,4))

## End(Not run)

kasperwelbers/corpustools documentation built on Sept. 1, 2018, 1:03 p.m.