Learn R Programming

Xplortext (version 1.00)

plot.TextData: Plot TextData objects

Description

Draws the barcharts of the longest documents, most frequent words and segments from a TextData object.

Usage

# S3 method for TextData
plot(x, ndoc=25, nword=25, nseg=25, stop.word.tm=FALSE, stop.word.user=NULL,
  theme=theme_bw(), col.fill="grey", col.lines="black", text.size=12, ...)

Arguments

x
object of TextData class
ndoc
number of documents in the barchart (by default 25)
nword
number of words in the barchart (by default 25)
nseg
number of segments in the barchart (by default 25)
stop.word.tm
the tm stopwords are not considered for the barchart (by default FALSE)
stop.word.user
the user's stopwords are not considered for the barchart (by default NULL)
theme
theme settings (see ggplot2 package; by default theme_bw())
col.fill
background color for the barChart bars (by default grey)
col.lines
lines color for the barChart bars (by default black)
text.size
text font size (by default 12)
further arguments passed to or from other methods...

See Also

TextData, print.TextData, summary.TextData

Examples

Run this code
# Non aggregate analysis
data(open.question)
res.TD<-TextData(open.question, var.text=c(9,10), remov.number=TRUE, Fmin=10, Dmin=10,  
 stop.word.tm=TRUE, context.quali=c("Gender","Age_Group","Education"), context.quanti=c("Age"))
plot(res.TD)

# Aggregate analysis
data(open.question)
res.TD<-TextData(open.question, var.text=c(9,10), var.agg="Gen_Age", remov.number=TRUE, 
 Fmin=10, Dmin=10, stop.word.tm=TRUE, context.quali=c("Gender","Age_Group","Education"), 
 context.quanti=c("Age"), segment=TRUE)
plot(res.TD)

Run the code above in your browser using DataLab