plot.LexChar: Plot LexChar objects

plot.LexCharR Documentation

Plot LexChar objects

Description

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

Usage

## S3 method for class '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, type=c("CharWord","quanti","quali"),sel.var.cat="ALL",
txt.var.cat=NULL, sel.words="ALL",...) 

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)

type

CharWord and draws the characteristic and anti-characteristic words; quanti draws characteristic words for all quantitative variables; quali draws only the words for one qualitative variable (by default CharWord)

sel.var.cat

name of contextual quantitative and/or qualitative contextual variables

txt.var.cat

new names of each category or quantitative variable (by default NULL

sel.words

words selected to plot if its p-value is less than prob (by default ALL

...

further arguments passed to or from other methods...

Author(s)

Ramón Alvarez-Esteban ramon.alvarez@unileon.es, Monica Bécue-Bertaut, Josep-Anton Sánchez-Espigares

See Also

LexChar, print.LexChar, summary.LexChar

Examples

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)

Xplortext documentation built on Nov. 10, 2023, 1:06 a.m.