mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-04 20:25:22 +08:00
Add dot aliases for STDEV/VAR
This commit is contained in:
parent
1c1a7c231e
commit
89c19b9bbd
1 changed files with 7 additions and 0 deletions
7
vendor/assets/javascripts/ruleJS.js
vendored
7
vendor/assets/javascripts/ruleJS.js
vendored
|
@ -1240,6 +1240,13 @@ var ruleJS = (function (root) {
|
|||
return Big(m).times(Big(10).pow(e)).toFixed();
|
||||
})
|
||||
|
||||
// Preprocess the following aliases for formulas
|
||||
// or parser won't accept them
|
||||
formula = formula.replace('STDEV.P', 'STDEVP');
|
||||
formula = formula.replace('STDEV.S', 'STDEVS');
|
||||
formula = formula.replace('VAR.P', 'VARP');
|
||||
formula = formula.replace('VAR.S', 'VARS');
|
||||
|
||||
parser.setObj(element);
|
||||
result = parser.parse(formula);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue