X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=PrintRScript.py;h=57a5f2d37995b5d9752c0a6c27a55f17002b540d;hp=757bd1e558a04e70a711a28824c6408906cc6c0a;hb=07e3f63fabafe6a7f90134a4e4bf229151d11f87;hpb=a6c0faa62f33e5e64ad7eab5b9d804be99c6759a diff --git a/PrintRScript.py b/PrintRScript.py index 757bd1e..57a5f2d 100644 --- a/PrintRScript.py +++ b/PrintRScript.py @@ -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() @@ -1189,7 +1193,7 @@ class TgenSpecScript(PrintRScript): self.packages(['textometry']) txt = """ tgen <- read.csv2("%s", row.names = 1, sep = '\\t') - """ % self.parametres['tgeneff'] + """ % ffr(self.parametres['tgeneff']) txt += """ tot <- tgen[nrow(tgen), ] result <- NULL