Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot-methods

Plot method for objects of class kRp.text


Description

Plot method for S4 objects of class kRp.text, plots the frequencies of tagged word classes.

Usage

plot(x, y, ...)

## S4 method for signature 'kRp.text,missing'
plot(x, what = "wclass", ...)

Arguments

x

An object of class kRp.text

y

From the generic plot function, ignored for koRpus class objects.

...

Any other argument suitable for plot()

what

Character string, valid options are:

"wclass":

Barplot of distribution of word classes

"letters":

Line plot of distribution of word length in letters

See Also

Examples

# code is only run when the english language package can be loaded
if(require("koRpus.lang.en", quietly = TRUE)){
  sample_file <- file.path(
    path.package("koRpus"), "examples", "corpus", "Reality_Winner.txt"
  )
  tokenized.obj <- tokenize(
    txt=sample_file,
    lang="en"
  )
  plot(tokenized.obj)
} else {}

koRpus

Text Analysis with Emphasis on POS Tagging, Readability, and Lexical Diversity

v0.13-6
GPL (>= 3)
Authors
Meik Michalke [aut, cre], Earl Brown [ctb], Alberto Mirisola [ctb], Alexandre Brulet [ctb], Laura Hauser [ctb]
Initial release
2021-05-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.