# S3 method for LexCA
plot(x, selDoc="ALL", selWord="ALL", selSeg=NULL, selDocSup=NULL,
selWordSup=NULL, quanti.sup=NULL, quali.sup=NULL, maxDocs=20, eigen=FALSE,
title=NULL, axes=c(1,2), col.doc="blue", col.word="red", col.doc.sup="darkblue",
col.word.sup="darkred", col.quanti.sup = "blue", col.quali.sup="darkgreen",
col.seg="cyan4", col="grey", cex=1, xlim=NULL, ylim=NULL, shadowtext=FALSE,
habillage="none", unselect=1, autoLab=c("auto", "yes", "no"), plot.new=TRUE, ...)
selDoc, selWord, selSeg, selDocSup, selWordSup, quanti.sup and quali.sup allow for selecting all or part of the elements of the corresponding type, using either labels, indexes or rules.
The syntax is the same for all types.
1. Using labels:
selDoc = c("doc1","doc5"): only the documents with labels doc1 and doc5 are plotted. quali.sup=c("varcateg1","category12"): only the categories (all of them) of categorical variable labeled "varcateg1" and the category labeled "category12" are plotted.
2.- Using indexes:
selDoc = c(1:5): documents 1 to 5 are plotted. quali.sup=c(1:5,7): categories 1 to 5 and 7 are plotted. The numbering of the categories have to be consulted in the LexCA numerical results.
3.- Using rules: Rules are based on the coordinates (coord), the contribution (contrib or meta; concerning only active elements) or the square cosine (cos2). Somes examples are given hereafter:
selDoc="coord 10": only the 10 documents with the highest coordinates, as globally computed on the 2 axes, are plotted. selWord="contrib 10": the words with a contribution to the inertia, of any of the 2 axes, over 10% of the axis inertia are plotted. selWord="meta 3": the words with a contribution over 3 times the average word contribution on any of the two axes are plotted. Only active words or documents can be selected. selDocSup="cos2 .85": the supplementary documents with a cos2 over 0.85, as summed on the 2 axes, are plotted. selWord="char 0.05": only the characteristic words of the documents selected in SelDoc are plotted. The selection of the words follow the rationale used in function LexChar using as limit for the p-value the value given, here.0.05.
LexCA
, print.LexCA
, summary.LexCA
data(open.question)
res.TD<-TextData(open.question,var.text=c(9,10), var.agg="Age_Group", Fmin=10, Dmin=10,
remov.number=TRUE, stop.word.tm=TRUE)
resCA <- LexCA(res.TD, graph=FALSE)
plot(resCA, selDoc="contrib 30", selWord="coord 20")
Run the code above in your browser using DataLab