Displayr has two primary languages for creating variables: R and JavaScript. For most problems, R is the better language, as it's designed for data analysis, which means that:
- It's much easier to write the code
- The code is much shorter
However, JavaScript is often faster. Consequently, if it's known that a particular variable or set of variables is the cause of a performance problem, it can be useful to verify if creating them in JavaScript instead of R will speed up the calculations. Please note that:
- This is unlikely to be worth the effort for a handful of variables.
- You can't link controls (e.g., list boxes, combo boxes) to JavaScript.
- Both R and JavaScript are much slower than using Create New Variables by Duplicating and Modifying Original Variables.
- For very large data sets, selecting a JavaScript variable and in the object inspector, ticking Data > Javascript Code > Accelerate (skip logic checks) will significantly improve the speed of JavaScript variables.