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
17 class SplitMatrixFromVar(AnalyseMatrix):
18 def doparametres(self, dlg=None) :
22 dial = FreqDialog(self.parent, self.tableau.get_colnames(), u"Column", size=(350, 200), showNA = False)
24 val = dial.ShowModal()
26 self.parametres['colsel'] = dial.list_box_1.GetSelections()
27 self.parametres['header'] = dial.header
29 self.parametres = None
33 newtabs = self.tableau.splitfromvar(self.parametres['colsel'][0])
35 fout = self.tableau.pathout['%s.csv' % mod].replace(u'*','')
36 with open(fout, 'w') as f :
37 f.write('\n'.join(['\t'.join(line) for line in newtabs[mod]]).encode(self.parent.syscoding))