Custom Widgets with R Scripts and R Code
What is a custom R script widget in QuestionPro BI?
QuestionPro BI lets you build custom widgets by executing R scripts and R code directly in the web interface of the BI analytics module. Analysts bring the full flexibility of R to their dashboards without exporting data or switching tools.
The script runs on the widget's selected data source, and its output is published as a widget alongside the rest of your BI dashboard, ready to share with stakeholders.
What can I do with custom R script widgets?
- Advanced statistics: Regression, ANOVA, correlation matrices, significance testing, and custom statistical models.
- Psychometric analysis: Scale reliability (Cronbach's alpha), exploratory and confirmatory factor analysis, and item analysis.
- Custom calculations: Indices, composite scores, and metrics specific to your research methodology.
- Custom visualizations: Charts and tables generated by your R code, displayed directly on the dashboard.
How do I create a custom widget using an R script?
1. Open your BI dashboard and click Add widget.
2. Select Custom widget.
3. Choose R script as the widget type, enter a widget name, and select the data source.
4. Write R code directly in the script editor, or paste an existing R script. The selected data source is available to your script as a data frame.
5. Click Run to execute the script and preview the output.
6. Review the results, refine the code if needed, and click Save. The widget is added to your dashboard.
How do custom widgets work with the rest of the dashboard?
- Live data: The script runs on the widget's data source, so results reflect your current responses.
- Dashboard layout: Custom widgets can be moved, resized, and arranged like any other widget.
- Sharing: Results are shared with stakeholders through the dashboard, with no R knowledge required to view them.
Best practices
- Test your code on a sample before saving it to a shared dashboard.
- Add comments to your script so other analysts can review and maintain it.
- Apply filters to exclude incomplete or invalid responses before running statistical analysis.
- Give each widget a clear name that describes the analysis it shows.
Frequently asked questions
Do I need to export data to run R analysis?
No. R scripts and R code execute directly in the QuestionPro BI web interface on your dashboard data.
Can I run psychometric analysis such as reliability and factor analysis?
Yes. Custom R script widgets support advanced statistical and psychometric analysis, including scale reliability and factor analysis.
Who can view custom widgets?
Anyone with access to the dashboard can view the widget output. Viewers do not need to know R.
License
This feature is available with the following license :
Contact Sales
Thank you for submitting feedback.