Custom calculations and custom variables are usually much, much slower than using the in-built features in Displayr. This article describes:
- Why Displayr's in-built features are faster
- The most common in-built features that you should be using
Why Displayr's in-built features are faster
Displayr's in-built features typically calculate things much faster than when users write custom code because:
- The Displayr code is optimized. For example, our code for calculating percentages and averages is heavily optimized.
- The underlying technology is faster. Displayr's in-built calculations use languages and other technologies that are much faster (e.g., C++, bit calculations).
- Users that write their own code tend to make errors.
- It takes longer to write code than to use Displayr's in-built features.
Common in-built features that are not used in many slow documents
The following features are almost always much, much faster when used by clicking and dragging than when a user writes their own code:
- Store data in data sets if you plan to use the data to create multiple tables or other analyses.
- Group variables into variable sets
- Create tables and crosstabs by dragging and dropping. See also Use Displayr's Native Tables.
- Create New Variables by Duplicating and Modifying Original Variables (e.g., changing their values, merging categories), rather than by writing custom code or ready-made new variables.
- Create and apply filters using the graphical user interface.
- Create and apply weights using the graphical user interface.
- Deal with missing values using other Missing Values settings for a variable (in the object inspector, press Missing values).
- Use Data File Relationship(s) rather than writing joins in code.
- Use Variable Sets rather than variables when referencing data in R code (unless the variable set will involve selecting variables that are not required).