This article explains what Inputs & Outputs are, how to view them, and how to navigate through Inputs & Outputs to identify bottlenecks in your code.
The Inputs & Outputs and how to view them
Outputs in Displayr can be either fixed — such as images and text — or dependent on data, such as visualizations, calculations, and tables. When an output is dependent on data, you can view its Inputs & Outputs by selecting the icon in the floating toolbar. Displayr will show you all the inputs used to calculate the output, as well as any downstream outputs.
The screenshot below shows a page in the Grocery Store NPS dashboard. The NPS promoter score (NPS) breakdown clustered pie chart is selected, and its Inputs & Outputs are shown at the bottom.
The Inputs & Outputs above show that:
- The selected chart is named chart.2.
- chart.2 is calculated from a table called table.Q12r3_3_2.Bakery.by.Bakery.
- table.Q12r3_3_2.Bakery.by.Bakery is calculated from two variables: Q12r2_3_2: Bakery and Bakery.
- The two variables are from the data file Shopping.sav.
Using the Inputs & Outputs to navigate
You can navigate by clicking on nodes in the Inputs & Outputs. For example, the screenshot below shows the Inputs & Outputs from above, after table.Q12r3_3_2.Bakery.by.Bakery has been clicked on.
The Inputs & Outputs show you which objects in a document depend on which other objects. When you click on the objects, you can then inspect their properties in the Properties to work out how the actual calculation is performed. For example, the word cloud depends on the variables Reasons for being a detractor: Bakery and Detractors: Bakery, and we can see in the Properties that Detractors: Bakery is used to filter Reasons for being a detractor: Bakery.
When you are finished using the Inputs & Outputs, you can click on the X in the right corner of the panel to close it. If you are looking at the Inputs & Outputs for a variable or output and there isn't anything to the right of it, then the item is not being used by any other items in the document. This is a useful way to see whether a variable or an output can be deleted.
Next
To examine any code within a calculation, variable, or data set, see How to Troubleshoot R Code in Displayr.
For more information on optimizing the performance of a document, see Optimize the Inputs & Outputs and How to Troubleshoot Speed and Performance Issues.