What is ‘R’?
‘R’ is a free and open-source software, which is known and widely used by academic researchers across the world for running statistical analyses. The software uses its own R-language, which is an easy-to-learn programming language, and which gives researchers the flexibility to program their own scripts (or ‘Notebooks’) for analyzing and visualizing data.
What are ‘R-Notebooks’?
From iMotions 8.0, we have replaced the hard-coded signal processing algorithms, which were originally programmed in source-code, by R-Notebooks. R-Notebooks are scripts of code that can be run to process data. With the installation of the iMotions 8.0, in the background, the software ‘R’ is also installed on your computer. When, during the analysis in iMotions, an algorithm is being executed, it utilizes the ‘R’ software in the background for carrying out the computations.
With this new initiative we try to combine the best of two worlds: on the one hand, we provide signal processing algorithms, which we are confident about that they are good algorithms that serve the needs of most users. On the other hand, by providing access to the R-code itself, we also offer the flexibility to adapt the R-code to the specific needs of individual users.
R-Notebooks in iMotions
With the iMotions R library, it is possible to edit or write notebooks that can be used to generate metrics, signals, or HTML reports for studies.
Notebooks combine R code and markdown and can be knitted (compiled) to a document that contains text, R code and graphics output. To access study data you can use the new iMotions R library. You can run existing and custom notebooks on your own computer with RStudio.
- Download and install R.
- Download and install RStudio.
- Open RStudio and go to Tools → Global Options → Code → Saving and set “Default text encoding” to UTF-8.
- Download and install the
imotionsApipackage and load it with the command
To see the library’s inline documentation, type
?imotionsApi in the RStudio console.
List of available R-Notebooks in iMotions
The following R-Notebooks are currently available from iMotions 8.0 onwards:
Galvanic Skin Response (GSR):
- GSR peak detection
- GSR peak binned aggregation
- GSR Signal Quality
- GSR Epoching
Facial Expression Analysis (FEA):
- AFFDEX Thresholding and Aggregation
- AFFDEX Blink Detection
- FACET Thresholding and Aggregation
- RealEyes Thresholding Aggregation
- AFFDEX Raw Data Statistics Export
- EEG Power Spectral Density
- EEG Power Spectral Density Aggregation
- EEG Frontal Asymmetry
- EEG Frontal Asymmetry Aggregation
- EEG Intersubject Correlation (Neural Synchrony)
- ECG Heart Rate and Heart Rate Variability
- EMG Smoothing and Normalization
- Eyetracker Blink Detection
- Skin Temperature
- Respiration Processing
SpO2 Oxygen Saturation:
- SpO2 Oxygen Saturation
- Raw Data Aggregation
- Respondent Statistics Export