1 #author : Pierre Ratinaud
2 #copyright 1012 Pierre Ratinaud
6 in.table <- read.csv2('/home/pierre/workspace/iramuteq/corpus/association_suede.csv', header = FALSE, row.names=1)
7 source('/home/pierre/workspace/iramuteq/Rscripts/Rgraph.R')
9 verges.table <- function(x, freq.ts = 'mean', rank.ts = 'mean') {
10 #x matrice : eff, rank
11 #table.out : eff in rows, rank in columns
14 if (freq.ts == 'mean') {
15 freq.ts <- mean(x[,1])
17 if (rank.ts == 'mean') {
18 rank.ts <- mean(x[,2])
24 if (!is.null(eff.cex)) x <- cbind(x,norm.eff=norm.vec(x[,1],eff.cex[1], eff.cex[2]))
26 if (!is.null(rank.cex)) x <- cbind(x,norm.rank=norm.vec(x[,1],rank.cex[1], rank.cex[2]))
28 case.1 <- x[which(x[,1] >= freq.ts & x[,2] <= rank.ts),]
29 case.2 <- x[which(x[,1] >= freq.ts & x[,2] > rank.ts),]
30 case.3 <- x[which(x[,1] < freq.ts & x[,2] <= rank.ts),]
31 case.4 <- x[which(x[,1] < freq.ts & x[,2] > rank.ts),]
33 ylims <- max(c(nrow(case.1), nrow(case.2), nrow(case.3) ,nrow(case.4)))
36 plot.case <- function(case) {
38 if (ncol(case) == 3) lab.cex <- case[,3]
40 plot(rep(1,length(txt)),1:length(txt),pch='',axes=FALSE, xlab='', ylab='', ylim = c(0,ylims))
41 ys <- ylims - length(txt)
42 ys <- (length(txt):1) + ys
43 text(1,ys,txt, xlab=NULL, ylab=NULL, cex=lab.cex)
51 box("figure", col=boxcolor)
53 box("figure", col=boxcolor)
55 box("figure", col=boxcolor)
57 box("figure", col=boxcolor)
59 mtext("rangs <= | rangs >", side=3, line=1, cex=1, col="blue", outer=TRUE)
60 mtext("fréquences < | fréquences >=", side=2, line=2, cex=1, col="blue", outer=TRUE)
61 box("outer", col="blue")