> For the complete documentation index, see [llms.txt](https://help.imotions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.imotions.com/lab/exports/r-processed-exports/export-r-processed-ecg-files.md).

# Export: R Processed ECG Files

Understand the ECGMetrics, ECGPeakTable and sensor data exports from the ECG R-Notebook, including heart rate and HRV columns such as RMSSD and LF/HF.

The R-Processed ECG data can be exported into the following files:

1. ECGMetrics.csv (in iMotions 10.3+)
2. ECGPeakTable.csv (in iMotions 10.4+)
3. R-Processed ECG data in the SensorData export files (in iMotions 10.3+)

Please see the description of each below:

1. **ECG Metrics file:** This file is called **ECGMetrics** in the form of .csv. The file contains processed results from the R-Notebook averaged across respondents and stimulus. The file has one row for each respondent and each **stimulus**/**scene**/**scene fragment**/**annotation**/**annotation instance** within the study. Each row contains information about Heart Rate (HR) and Heart Rate Variability (HRV) metrics by this respondent during that stimulus / scene / scene fragment / annotation / annotation instance.

   ![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-cdb1783b3d6f7ea5555742caab8785fb6c180d67%2Fc88ca87722_image-69-.webp?alt=media)

## Descriptions of the exported file:

| **Header**                 | **Explanation**                                                                                                                                                                                                                                                                                                                    |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Study Name                 | The name of the study                                                                                                                                                                                                                                                                                                              |
| Respondent Name            | The respondent who experienced these ECG peaks under a certain stimulus type                                                                                                                                                                                                                                                       |
| Gender                     | The gender of the respondent who experienced these ECG peaks under a certain stimulus type                                                                                                                                                                                                                                         |
| Age                        | The age of the respondent who experienced these ECG peaks under a certain stimulus type                                                                                                                                                                                                                                            |
| Group                      | The group variables of the respondent you specified when creating the study                                                                                                                                                                                                                                                        |
| Type                       | Type of the stimulus during which these ECG peaks were experienced: Stimulus, Scene, Scene (Fragment), Annotation, Annotation (Instance)                                                                                                                                                                                           |
| Label                      | The given name of the stimulus, scene and annotation                                                                                                                                                                                                                                                                               |
| Start (ms)                 | The start time (in ms) of the certain stimulus type relative to the start of the study                                                                                                                                                                                                                                             |
| Duration (ms)              | The duration (in ms) of the certain stimulus type                                                                                                                                                                                                                                                                                  |
| Parent Stimulus            | The name of the stimulus where the scene was created from; the name of the stimulus/scene where the annotation was created from                                                                                                                                                                                                    |
| Comment                    | Comment that was added to the interval                                                                                                                                                                                                                                                                                             |
| Percentage of missed peaks | Percentage (in %) of estimated missing peaks in the interval                                                                                                                                                                                                                                                                       |
| Average Heart Rate         | The average heart rate (in beats/min) the respondent had during the certain stimulus type                                                                                                                                                                                                                                          |
| Average IBI                | The average R-R interval or inter-beat interval (IBI) the respondent had during the certain stimulus type. In the unit of millisecond.                                                                                                                                                                                             |
| RMSSD                      | The average RMSSD (root mean square of the successive differences) the respondent had during the certain stimulus type. In the unit of millisecond.                                                                                                                                                                                |
| SDNN                       | The average SDNN (standard deviation of the N-N intervals) the respondent had during a certain stimulus type. In the unit of millisecond.                                                                                                                                                                                          |
| VLF Power                  | Absolute power (in ms²) of the very-low-frequency band the respondent had during the certain stimulus type                                                                                                                                                                                                                         |
| LF Power                   | Absolute power (in ms²) of the low-frequency band the respondent had during the certain stimulus type                                                                                                                                                                                                                              |
| HF Power                   | Absolute power (in ms²) of the high-frequency band the respondent had during the certain stimulus type                                                                                                                                                                                                                             |
| LF/HF                      | The ratio of LF-to-HF power the respondent had during the certain stimulus type.                                                                                                                                                                                                                                                   |
| Normalized LF Power (%)    | <p>Normalized power of the low-frequency band the respondent had during the certain stimulus type.<br>It is computed by taking low frequency dividing it by the sum of high and low frequency and multiplying it by 100. Simplified as LF Power (ms²)/(LF Power (ms²) + HF Power (ms²)) \* 100%</p>                                |
| Normalized HF Power (%)    | <p>Normalized power of the high-frequency band the respondent had during the certain stimulus type.<br>It is computed by taking high frequency dividing it by the sum of high and low frequency and multiplying it by 100. Simplified as HF Power (ms²)/(LF Power (ms²) + HF Power (ms²)) \* 100%</p>                              |
| Relative LF Power (%)      | <p>Relative power (in %) of the low-frequency band the respondent had during the certain stimulus type.<br>It is calculated by taking low frequency and dividing it by the total power (the sum of all frequencies: TP = HF + LF + VLF) and multiplying it with 100%. Simplified as LF Power (ms²)/(total power (ms²)) \* 100%</p> |
| Relative HF Power (%)      | <p>Relative power (in %) of the high-frequency band the respondent had during the certain stimulus type.<br>It is calculated by taking high frequency and dividing it by the total power (the sum of all frequencies: TP = HF + LF + VLF) and multiplying it by 100%. HF Power (ms²)/(total power (ms²)) \* 100%</p>               |

2. **ECG Peak Table exports:** This file is called ECGPeakTable in the form of .csv. As shown in the screenshot below, the file contains Respondent details (columns B to E in the screenshot below), Name of stimulus/annotation/scene (column F in the screenshot below), Peak index (from start of recording), Peak index by stimulus, Peak Time and Inter-beat intervals (IBIs).

![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-d8ebf159dd3273b799e1a6e64e2642a5dcd3b8c9%2Fa2eedbbee3_ECG-Peak-Table-exports-0.webp?alt=media)

3. **SensorData exports:** This file is also in csv format. You can have all the time series data and event markers in sync as shown in the screenshot below.

![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-e48b5de217537985284e778d0608ebcaf34f0aac%2Fa86731b17d_ECG-SensorData-exports-0.webp?alt=media)

If you would like to see what scenes and annotations instances are, check out the explanation below.

*First, what is* ***scene fragment*** *and* ***annotation instance**?*

For some stimuli types (E.g., Website, Screen Recording), it is possible to create a scene with multiple fragments. For all stimulus types, you can create an annotation with multiple instances. A detailed instruction on how to create scene and annotation is [*here (scene creation)*](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/scene-editor.md) and *here (annotation creation)*.

Example: Scene with 3 **scene fragments**:

![Scene\_with\_3\_fragments.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-1683a8a566a82e7bd67b553bebfb509f58c6c398%2Fee3cf1eee8_1xpribeqk6lwvlqjtlkq.webp?alt=media)

Example: Annotation with 3 **annotation instances**:

![annotation\_with\_3\_instances.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-c4778e9b5e25bcea45056482068147f09e466000%2Fc59e61bb13_dyhmhhfonukzrnbz0hrsha.webp?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.imotions.com/lab/exports/r-processed-exports/export-r-processed-ecg-files.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
