Learn R Programming

Xplortext (version 1.00)

plot.LexChar: Plot LexChar objects

Description

Draws the characteristic and anti-characteristic words of documents from a LexChar object.

Usage

# S3 method for LexChar
plot(x, char.negat=TRUE, col.char.posit="blue", col.char.negat="red",
col.lines="black", theme=theme_bw(), text.size=12, numr=1, numc=2, top=NULL, 
max.posit=15, max.negat=15, ...)

Arguments

x
object of LexChar class
char.negat
if TRUE, the anti-characteristic words are plotted (by default TRUE)
col.char.posit
color for the characteristic words (by default "blue")
col.char.negat
color for the anti-characteristic words (by default "red")
col.lines
color for the lines of barplot (by default "black")
theme
used to modify the theme settings by ggplot2 package (by default theme_bw())
text.size
size of the font (by default 12)
numr
number of rows in each multiple graph (by default 1 row)
numc
number of columns in each multiple graph (by default 2 columns)
top
title of the graph (by default NULL)
max.posit
maximum number of characteristic words (by default 15)
max.negat
maximum number of anti-characteristic words (by default 15)
further arguments passed to or from other methods...

See Also

LexChar, print.LexChar

Examples

Run this code
data(open.question)
res.TD<-TextData(open.question, var.text=c(9,10), var.agg="Gen_Edu", Fmin=10, Dmin=10,
        remov.number=TRUE, stop.word.tm=TRUE)
LD<-LexChar(res.TD,maxCharDoc = 0)
plot(LD)

Run the code above in your browser using DataLab