...
[iramuteq] / Rscripts / afc_lex.R
1 #Author: Pierre Ratinaud
2 #Copyright (c) 20011 Pierre Ratinaud
3 #Lisense: GNU/GPL
4
5
6 #fichier genere par IRaMuTeq
7 source('%s')
8 load('%s')
9 doafc <- TRUE
10 nd <- %i
11 filename <-'%s'
12 width <- %i
13 height <- %i
14 facteurs <- '%s'
15 lignes <- '%s'
16 colonnes <- '%s'
17
18 filein <- 'tableafcm.csv'
19 library(ca)
20
21 if (doafc) {
22     cont <- read.csv2('tableafcm.csv', header = TRUE, row.names = 1, quote='"')
23     afc <- ca(cont, nd=nd)
24     afc <- AddCorrelationOk(afc)
25     afc <- summary.ca.dm(afc)
26     afc_table <- create_afc_table(afc)
27     write.csv2(afc_table$facteur, file = facteurs)
28     write.csv2(afc_table$colonne, file = colonnes)
29     write.csv2(afc_table$ligne, file = lignes)
30 }
31
32 #open_file_graph(filename, width = width, height = height)
33 #make_afc_graph(toplot,classes,clnb, xlab, ylab, cex_txt = NULL)