In addition to the usual icons in the Report and Data Sources trees that indicate the type of each item, there are also icons that draw your attention to any errors or warnings and will mark any items that haven't been recalculated. This enables you to investigate potential issues when data changes or an unexpected result in a calculation. They also let you know which variables haven't been recalculated with updated inputs, in case you want to recalculate them manually to check that they still work. This article explains how these different icons are used in Displayr, including:
The processing icons
There are 3 icons used in the Report and Data Sources trees to denote things about the processing of items:
- A red exclamation point
- indicates an error where something can't be calculated and is in an error state. You will need to take action to fix the error.
- An orange exclamation point
- indicates a warning message was returned. This still generates results for the item, but you should review the warning to see if any further action is needed.
- A red clock
- indicates the item is an R-based item that hasn't been recalculated after its dependencies/data have changed.
Recursiveness
Similar to how items selected in the Report and Data Sources trees are recursive (such as when you select a Page or Folder, all the outputs in that Page or Folder are also "selected"), processing icons appear at the top-level. For example, if there is an output on a Page in a Folder with an error, all 3 items - the output, Page, and Folder - will have the red exclamation point icon next to them so you can drill down to easily find what is in error.
How to investigate and resolve
Errors
Once you have selected the individual item with the error, you can see the actual error message at the top of the object inspector when you click on the item. See the object 'a' not found error in the picture below.
If an item is in error, any items that are dependent on it will also show an error, as well as the underlying error generated on the input item. For example, if the calc.1 output with the error above was used in a visualization, the visualization would also show an error from the visualization's code, and the underlying calc.1 error. There will also be a link in the visualization's error message to jump to calc.1 to investigate.
In order to remove the errors, you must find the initial underlying item that is in error and fix it. You can then clear the errors from the dependent items by viewing/selecting them to force them to be recalculated. Depending on how comfortable you are with R code, you could also potentially suppress errors and create your own error messages, see How to Handle Outputs With Small or No Data Using R.
Warnings
Once you have selected the individual item with the warning, you are able to see the actual warning message at the top of the object inspector when you click on the item. Warnings indicate that something with the item may be an issue, but can be ignored if you deem them not to be an issue. The Setting row names on a tibble is deprecated warning in the picture below can be removed if you edit the code to use a different method to rename the rows. Or you can simply ignore the message, but in this case, you run the risk of the code breaking in the future when the particular function is no longer supported. You can click the "x" on the warning message to make it disappear, but when the item is recalculated, the warning will reappear.
Outdated items
Since R-based items are processed on a special R server on the cloud, it is less efficient to calculate these than other items. Because of this, R-based items are processed at the time you view an output that depends on them OR when you click Calculate on the R-based variable to manually calculate it with updated data/inputs. An important thing to remember about outdated items is that any error or warning message will only pop up when they are calculated.
Next
Viewing Dependency Graphs to Understand Calculations
Common Error Messages in R Code
UPCOMING WEBINAR: The Roadmap for Market Researchers in the Age of AI