Révision 3789
TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/misc/Specif2CoinMacro.groovy (revision 3789) | ||
---|---|---|
127 | 127 |
|
128 | 128 |
nthrows.times { |
129 | 129 |
n = it+1 |
130 |
p = 1/2**(n) as double
|
|
130 |
p = 1/2*n as double
|
|
131 | 131 |
s = java.lang.Math.log10(p)-1 as int |
132 | 132 |
if (min[s]) { if (min[s] > n) min[s] = n } else min[s] = n |
133 | 133 |
if (max[s]) { if (max[s] < n) max[s] = n } else max[s] = n |
TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/imports/OpenImportFormMacro.groovy (revision 3789) | ||
---|---|---|
9 | 9 |
@Field @Option(name="scriptFile", usage="an example file", widget="File", required=true, def="xxxLoader.groovy") |
10 | 10 |
File scriptFile |
11 | 11 |
|
12 |
@Field @Option(name="doUpdate", usage="select to update the corpus", widget="Boolean", required=true, def="false") |
|
13 |
def doUpdate |
|
14 |
|
|
12 | 15 |
if (!ParametersDialog.open(this)) return; |
13 | 16 |
|
14 | 17 |
File script = scriptFile // if not done, using scriptFile raise a Cast exception to 'groovy.lang.Reference' |
... | ... | |
26 | 29 |
String rootpath = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/org/txm/scripts/importer") |
27 | 30 |
|
28 | 31 |
if (path.startsWith(rootpath)) { |
29 |
OpenImportForm.openfile(path.substring(Toolbox.getTxmHomePath().length()));
|
|
32 |
OpenImportForm.open(script, doUpdate);
|
|
30 | 33 |
} else { |
31 | 34 |
println "Error: import start script must be included in $rootpath" |
32 | 35 |
} |
TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/r/Index2barplotMacro.groovy (revision 3789) | ||
---|---|---|
16 | 16 |
String symbol = null; |
17 | 17 |
String prop = "none" |
18 | 18 |
if (sel instanceof Index) { |
19 |
sel.compute(false) |
|
19 | 20 |
println "Sending Index data to R..." |
20 | 21 |
symbol = ((Index)sel).asRMatrix() |
21 | 22 |
symbol = "t("+symbol+'$data)' |
TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/r/ExecRMacro.groovy (revision 3789) | ||
---|---|---|
16 | 16 |
String symbol = null; |
17 | 17 |
String prop = "none" |
18 | 18 |
if (sel instanceof Index) { |
19 |
sel.compute(false) |
|
19 | 20 |
println "Sending Index data to R..." |
20 |
((Index)sel).asRMatrix() |
|
21 |
symbol = "t("+((Index)sel).getSymbol()+'$data)'
|
|
21 |
symbol = ((Index)sel).asRMatrix()
|
|
22 |
symbol = "t("+symbol+'$data)'
|
|
22 | 23 |
prop = ((Index)sel).getProperties().toString() |
23 | 24 |
} else { |
24 | 25 |
println "Selection is not an Index. Aborting." |
Formats disponibles : Unified diff