X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=Rscripts%2Fafc_graph.R;h=5b12163e7d4136b97f7a77199cafc73bcaf3eccc;hp=ffca92ade3a1414086d3cd145ac2d854354ee4fa;hb=42a67a41b64a6e0cc3fd2a63a0749e9aa4b9374c;hpb=7f5e0ba6ece181a04d872a7b6eeb2f13b33aa455 diff --git a/Rscripts/afc_graph.R b/Rscripts/afc_graph.R index ffca92a..5b12163 100644 --- a/Rscripts/afc_graph.R +++ b/Rscripts/afc_graph.R @@ -31,6 +31,7 @@ tchi <- %s tchi.min <- %i tchi.max <- %i dirout <- '%s' +do.svg <- %s xminmax <- NULL yminmax <- NULL @@ -50,6 +51,7 @@ if ( qui == 3 ) { if ( what == 0 ) table.in <- afc$colcoord if ( what == 1 ) table.in <- afc$colcrl rownames(table.in) <- afc$colnames + eff <- afc$colmass if (typegraph == 0) { table.in<-table.in[,c(x,y)] } else { @@ -75,21 +77,27 @@ if ( qui == 3 ) { ry <- range(table.in[,2], na.rm = TRUE) rz <- range(table.in[,3], na.rm = TRUE) } + if (exists(afctable)) { + eff <- rowSums(afctable) + } else { + eff <- afctable$rowmass + } + if (!is.null(debsup)) { if ( qui == 0 ) { table.in <- table.in[1:(debsup-1),] tablechi <- tablechi[1:(debsup-1),] - cex.par <- afc$rowmass[1:(debsup-1)] + cex.par <- eff[1:(debsup-1)] } if ( qui == 1 ) { table.in <- table.in[debsup:(debet-1),] tablechi <- tablechi[debsup:(debet-1),] - #cex.par <- afc$rowmass[debsup:(debet-1)] + cex.par <- eff[debsup:(debet-1)] } if ( qui == 2 ) { table.in <- table.in[debet:nrow(table.in),] tablechi <- tablechi[debet:nrow(tablechi),] - #cex.par <- afc$rowmass[debet:nrow(tablechi)] + cex.par <- eff[debet:nrow(afctable)] } } @@ -98,14 +106,14 @@ if ( qui == 3 ) { if (!is.null(debet)) { table.in <- table.in[1:(debet-1),] tablechi <- tablechi[1:(debet-1),] - cex.par <- afc$rowmass[1:(debet-1)] + cex.par <- eff[1:(debet-1)] } else { - cex.par <- afc$rowmass + cex.par <- eff } } else { table.in <- table.in[debet:nrow(table.in),] tablechi <- tablechi[debet:nrow(tablechi),] - #cex.par <- afc$rowmass[debet:nrow(tablechi)] + cex.par <- eff[debet:nrow(afctable)] } } @@ -131,7 +139,11 @@ if ( qui == 3 ) { infp <- which(is.infinite(maxchi) & maxchi > 0) if (length(infp)) { maxchi[infp] <- NA - valmax <- max(maxchi, na.rm = TRUE) + if (!length(infp) == length(maxchi)) { + valmax <- max(maxchi, na.rm = TRUE) + } else { + valmax <- 8 + } maxchi[infp] <- valmax + 2 } if (cex.txt) { @@ -156,7 +168,7 @@ if (is.null(xminmax)) { if (typegraph == 0) { - open_file_graph(fileout, width = width, height = height) + open_file_graph(fileout, width = width, height = height, svg = do.svg) parcex <- taillecar/10 par(cex = parcex) if (over) {