X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=Rscripts%2FCHD.R;h=e6a3c7b5d6733ad2ec7e23d2155eff87da5e5305;hp=049d5c7badcd3f5ffe733e61373ad3f858b7fd2c;hb=4f2dc8e6823ac5886f758a6ad3f1ae6acb01916c;hpb=13666be5de5eeffbe63774c3c0aecd407b519ac6 diff --git a/Rscripts/CHD.R b/Rscripts/CHD.R index 049d5c7..e6a3c7b 100644 --- a/Rscripts/CHD.R +++ b/Rscripts/CHD.R @@ -1,6 +1,6 @@ #Author: Pierre Ratinaud #Copyright (c) 2008-2011 Pierre Ratinaud -#Lisense: GNU/GPL +#License: GNU/GPL pp<-function(txt,val) { d<-paste(txt,' : ') @@ -41,7 +41,11 @@ find.max <- function(dtable, chitable, compte, rmax, maxinter, sc, TT) { res } -CHD<-function(data.in, x=9, mode.patate = FALSE, libsvdc=FALSE, libsvdc.path=NULL){ + + + + +CHD<-function(data.in, x=9, mode.patate = FALSE, svd.method, libsvdc.path=NULL){ # sink('/home/pierre/workspace/iramuteq/dev/findchi2.txt') dataori <- data.in row.names(dataori) <- rownames(data.in) @@ -78,7 +82,7 @@ CHD<-function(data.in, x=9, mode.patate = FALSE, libsvdc=FALSE, libsvdc.path=NUL #extraction du premier facteur de l'afc print('afc') pp('taille dtable dans boucle (col/row)',c(ncol(dtable),nrow(dtable))) - afc<-boostana(dtable, nd=1, libsvdc=libsvdc, libsvdc.path=libsvdc.path) + afc<-boostana(dtable, nd=1, svd.method = svd.method, libsvdc.path=libsvdc.path) pp('SV',afc$singular.values) pp('V.P.', afc$eigen.values) coordrow <- as.matrix(afc$row.scores[,1]) @@ -103,7 +107,7 @@ CHD<-function(data.in, x=9, mode.patate = FALSE, libsvdc=FALSE, libsvdc.path=NUL rmax <- NULL inert <- find.max(dtable, chitable, compte, rmax, maxinter, sc, TT) - print('@@@@@@@@@@@@@@@@@@@@@@@@@@@@') + print('@@@@@@@@@@@@@@@@@@@@@@@@@@@@') pp('max inter phase 1', inert$maxinter/TT)#max(listinter)) print('@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ordert <- ordert[order(ordert[,3]),]