Rules

From Displayr
Jump to navigation Jump to search

Introduction

This article describes how to apply rules to tables in Displayr. Rules are table calculations and formatting that are laid on top of default Displayr tables (i.e. not R tables) to add conditional formatting and various other computations.

Requirements

A Displayr document with tables.

Method - Apply Rules

  1. To apply a rule, simply select your table and click the Plus (+) button under the RULES section of the object inspector.
  2. The selected rule will then be added to the RULES field box.
  3. You are able to add multiple rules to your table. Note, the rules will be applied in the order they appear in this box. Depending on the rules being used, you may need to change the order via dragging one above the other to ensure they work as intended. For example, if you wish to shade table cells but also want to remove values under a specific value, you would need to apply the shading cells rule first.
  4. To automatically apply this rule to all new tables, right-click the rule and tick Use for new table and charts.
  5. To add this rule to all existing tables, right-click and select Apply > Add to every item in the document.
  6. To add this rule to all selected tables, right-click and select Apply > Add to selected items.
  7. Note that changing the dimensions of a table by, for example, using the Switch rows and columns option, will affect the implementation of the rule. You may then need to apply an alternate rule if it is specific to rows or columns.

Rules box.png

Method - Edit Rules

  1. To edit rules, right-click the appropriate rule in the object inspector and select Edit.
  2. Change the necessary settings and press OK.

Method - Delete Rules

  1. To delete rules, right-click the appropriate rule in the object inspector > Delete. Note, if you have applied this rule to all tables in one step (as opposed to doing so individually) or have copied a table with the rule already applied, this option will delete it from all tables that use this rule.
  2. Alternatively, you can delete the rule from all existing tables by right-clicking and selecting Apply > Remove from every item in the document.
  3. To only remove the rule from selected tables, right-click and select Apply > Remove from selected items.