I am not sure is it possible or not. I need to use a t-distribution in my ReQL from a nodeJS Package. The code is something like this:
Query.map(function(doc){
return {
'DesScore': r.do(doc('MXt'),
doc('MXdf'),
r.js('(function(v,df){
var distributions = require("distributions.js");
var studentt = distributions.Studentt(df);
return studentt.inv(-1.*Math.abs(v))*2.*100.;}) '))
};
})
But I get
Unhandled rejection ReqlQueryLogicError: ReferenceError: require is not defined in:
How can I load a package in ReQL js interpreter?
Thanks in advance for any help.