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 who 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:
- Use a single large table to input multiple visualizations, with the settings in Row Manipulations and Column Manipulations to both select ratios in the table and to manipulate the table (e.g., Rows, Columns to show, Sort).
-
When a table is created in Displayr, you can format the row heights, column widths, background, borders, and fonts in cells. Such formatting is always vastly faster than when using Autofit tables, which are performed via calculation instead.
- Store data in data sets if you plan to use the data to create multiple tables or other analyses.
- 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 Displayr's multiple response structures - Nominal - Multi, Binary - Multi, Ordinal - Multi, Pick Any - Grid, Number - Grid, and Number - Multi - rather than stacking data.
- Use Rules, rather than writing R code to manipulate tables.
- Use the calculations available for a table available in Statistics > Cells.