X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=tabsimi.py;h=91d2230f58fd3d4ae54aad8c5b4ec37ca9d354dc;hp=53974aaed0e463f73ceceabcc84f9fe012f3e9b7;hb=ad8fe486b34f1cee918ea8564bf909e30cd25328;hpb=b0333175cc68917ceb33589b0b354bf931fec245 diff --git a/tabsimi.py b/tabsimi.py index 53974aa..91d2230 100644 --- a/tabsimi.py +++ b/tabsimi.py @@ -6,11 +6,14 @@ from chemins import ConstructPathOut, construct_simipath, ffr from functions import print_liste, exec_rcode, read_list_file, check_Rresult, indices_simi, treat_var_mod -from dialog import PrefSimi, SelectColDial, OptLexi +from dialog import SelectColDial, OptLexi +from guifunct import PrefSimi from listlex import * import wx -import wx.lib.agw.aui as aui -from numpy import * +if wx.__version__ >= '2.11' : + import wx.lib.agw.aui as aui +else : + import aui import os import tempfile import datetime @@ -33,7 +36,7 @@ class DoSimi(): else : self.paramsimi = {'coeff' : 0, 'layout' : 2, - 'type' : 1, + 'type_graph' : 1, 'arbremax' : 1, 'coeff_tv' : 0, 'coeff_tv_nb' : 10, @@ -183,7 +186,7 @@ class DoSimi(): paramsimi = {'coeff' : self.dial.choice1.GetSelection(), 'layout' : self.dial.choice2.GetSelection(), - 'type' : self.dial.choice3.GetSelection(), + 'type_graph' : self.dial.choice3.GetSelection(), 'arbremax' : self.dial.check1.GetValue(), 'coeff_tv' : self.dial.check_s_size.GetValue(), 'coeff_tv_nb' : self.dial.spin_tv.GetValue(), @@ -340,7 +343,7 @@ class DoSimi(): """ if not self.paramsimi['keep_coord'] : txt += """ - cn <- read.table("%s", sep=';', quote='"') + cn <- read.csv("%s", sep='\t', quote='"', headers = FALSE) colnames(dm) <- cn[,1] #colnames(dml) <- cn[,1] """ % ffr(active_file) @@ -407,15 +410,15 @@ class DoSimi(): if self.paramsimi['layout'] == 4 : layout = 'graphopt' self.filename='' - if self.paramsimi['type'] == 0 : type = 'tkplot' - if self.paramsimi['type'] == 1 : + if self.paramsimi['type_graph'] == 0 : type = 'tkplot' + if self.paramsimi['type_graph'] == 1 : graphnb = 1 type = 'nplot' dirout = os.path.dirname(self.DictPathOut['mat01']) while os.path.exists(os.path.join(dirout,'graph_simi_'+str(graphnb)+'.png')): graphnb +=1 self.filename = ffr(os.path.join(dirout,'graph_simi_'+str(graphnb)+'.png')) - if self.paramsimi['type'] == 2 : type = 'rgl' + if self.paramsimi['type_graph'] == 2 : type = 'rgl' if self.paramsimi['arbremax'] : arbremax = 'TRUE'