X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=PrintRScript.py;h=a4ed14dfb6d8948ca93df01083e92695ef1d860f;hp=b0e64b9f92fdbfdf02be7fcfd0966c53180a181c;hb=9ba3d2c5c6c49439c8b2ff4ae6bd7a632146850a;hpb=cea43bf2d04afccde4c275170f448a499c5f3256 diff --git a/PrintRScript.py b/PrintRScript.py index b0e64b9..a4ed14d 100644 --- a/PrintRScript.py +++ b/PrintRScript.py @@ -211,7 +211,7 @@ def RchdTxt(DicoPath, RscriptPath, mincl, classif_mode, nbt = 9, svdmethod = 'sv # open_file_graph("%s", widt = 600, height=400) # plot(tree.tot1$tree.cl) # dev.off() - """%DicoPath['arbre1'] + """ % DicoPath['arbre1'] if classif_mode == 0: txt += """ @@ -1161,6 +1161,10 @@ class ProtoScript(PrintRScript) : def make_script(self) : self.sources([self.analyse.parent.RscriptsPath['Rgraph'], self.analyse.parent.RscriptsPath['prototypical.R']]) self.packages(['wordcloud']) + if self.parametres.get('cloud', False) : + cloud = 'TRUE' + else : + cloud = 'FALSE' txt = """ errorn <- function(x) { qnorm(0.975)*sd(x)/sqrt(lenght(n)) @@ -1170,9 +1174,9 @@ class ProtoScript(PrintRScript) : } mat <- read.csv2("%s", header = FALSE, row.names=1, sep='\t', quote='"', dec='.') open_file_graph("%s",height=800, width=1000) - prototypical(mat, mfreq = %s, mrank = %s, cloud = FALSE, cexrange=c(1,2.4), cexalpha= c(0.4, 1)) + prototypical(mat, mfreq = %s, mrank = %s, cloud = FALSE, cexrange=c(1,2.4), cexalpha= c(0.4, 1), type = '%s') dev.off() - """ % (self.analyse.pathout['table.csv'], self.analyse.pathout['proto.png'], self.parametres['limfreq'], self.parametres['limrang']) + """ % (self.analyse.pathout['table.csv'], self.analyse.pathout['proto.png'], self.parametres['limfreq'], self.parametres['limrang'], self.parametres['typegraph']) self.add(txt) self.write()