X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=Rscripts%2Fafc_graph.R;h=5b12163e7d4136b97f7a77199cafc73bcaf3eccc;hp=d067c162a844adaddf39aaf1001c8f16b489b26f;hb=fc14fc86c13eb0ed0f420771b08cc42a5db90c01;hpb=1fb687c23b19ae4cc88146acf393041356c1df3a diff --git a/Rscripts/afc_graph.R b/Rscripts/afc_graph.R index d067c16..5b12163 100644 --- a/Rscripts/afc_graph.R +++ b/Rscripts/afc_graph.R @@ -51,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 { @@ -76,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)] } } @@ -99,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)] } } @@ -132,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) {