Description Usage Arguments Value Examples
Creates a plot of the counts/proportion of given wordgroups (wordlist
)
in the subcorpus. The counts/proportion can be calculated on document or word
level - with an 'and' or 'or' link - and additionally can be normalised by
a subcorporus, which could be specified by id
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | plotFreq(
object,
id = names(object$text),
type = c("docs", "words"),
wordlist,
link = c("and", "or"),
wnames,
ignore.case = FALSE,
rel = FALSE,
mark = TRUE,
unit = "month",
curves = c("exact", "smooth", "both"),
smooth = 0.05,
both.lwd,
both.lty,
main,
xlab,
ylab,
ylim,
col,
legend = "topright",
natozero = TRUE,
file,
...
)
|
object |
|
id |
|
type |
|
wordlist |
list of |
link |
|
wnames |
|
ignore.case |
|
rel |
|
mark |
|
unit |
|
curves |
|
smooth |
|
both.lwd |
graphical parameter for smoothed values
if |
both.lty |
graphical parameter for smoothed values
if |
main |
|
xlab |
|
ylab |
|
ylim |
(default if |
col |
graphical parameter, could be a vector. If |
legend |
|
natozero |
|
file |
|
... |
additional graphical parameters |
A plot.
Invisible: A dataframe with columns date
and wnames
- and
additionally columns wnames_rel
for rel = TRUE
- with the
counts (and proportion) of the given wordgroups.
1 2 3 4 5 6 | ## Not run:
data(politics)
poliClean <- cleanTexts(politics)
plotFreq(poliClean, wordlist=c("obama", "bush"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.