Processing data with R code


Insights Explorer provides an integrated environment for writing and executing R code through its code editor and interactive console.

Loading and executing R files

You can view and execute the R files uploaded into your report files or Insights Explorer. Double-click any R file to open it in the code editor, where you can modify, run, or save them using the standard editor functions described below.

Loading and executing R files in Insights Explorer

Working with the code editor

The code editor in the top-left corner provides a dedicated workspace for writing and editing R scripts with helpful functions and keyboard shortcuts:

  • Run executes all code in the editor. Use Ctrl + Enter as keyboard shortcut.
  • Run selected executes only highlighted code sections. Use Ctrl + Shift + Enter as keyboard shortcut.
  • Prettify formats and organises your code for better readability.
  • Enable code completion provides automatic suggestions while typing. Use Ctrl + Space as keyboard shortcut.
  • lists all the keyboard shortcuts supported.
  • Save current session. Use Ctrl + S as keyboard shortcut.

Other keyboard shortcuts supported include:

  • Undo using Ctrl + Z or Ctrl + U
  • Redo using Ctrl + Shift + Z or Ctrl + Y
  • Delete to line using Ctrl + Backspace
  • Duplicate using Ctrl + D
  • Fullscreen mode using F11
  • Move section up using Ctrl + Shift + ArrowUp
  • Move section down using Ctrl + Shift + ArrowDown
  • Select all using Ctrl + A
  • Open search function using Ctrl + F
  • Find next using F3 or Ctrl + G
  • Find previous using Shift + F3 or Ctrl + Shift + G
Example of running R code

Working with the console

The console allows users to enter R commands and view outputs, with commands processed sequentially in a queue. The console appears in the bottom-left corner by default. It moves to the top-right as the Terminal when the chat or R code editor expands.

Example of running R code

You can use the three-dot menu button in the top-left corner of the console to manually choose its position.

Example of running R code

Next steps

You can also read about: