2 # -*- coding: utf-8 -*-
3 #Author: Pierre Ratinaud
4 #Copyright (c) 2014 Pierre Ratinaud
9 from chemins import ffr, FFF
11 from time import sleep
12 from analysematrix import AnalyseMatrix
13 from functions import exec_rcode, check_Rresult
14 from dialog import FreqDialog
15 from PrintRScript import PrintRScript
16 from tableau import Tableau
18 class SplitMatrixFromVar(AnalyseMatrix):
19 def doparametres(self, dlg=None) :
23 dial = FreqDialog(self.parent, self.tableau.get_colnames(), u"Column", size=(350, 200), showNA = False)
25 val = dial.ShowModal()
27 self.parametres['colsel'] = dial.m_listBox1.GetSelections()
28 self.parametres['header'] = dial.header
29 self.parametres['tohistory'] = False
31 self.parametres = None
35 newtabs = self.tableau.splitfromvar(self.parametres['colsel'][0])
37 tab = Tableau(self.ira, os.path.join(self.tableau.pathout['%s.csv' % mod]).replace(u'*',''))
38 if not os.path.exists(tab.pathout.dirout) :
39 os.mkdir(tab.pathout.dirout)
40 tab.linecontent = newtabs[mod]
41 tab.make_content_simple()
42 tab.parametres['matrix'] = tab.parametres['uuid']
43 self.ira.tree.OnItemAppend(tab.parametres, select = False)