This vignette can be used demonstration data that are already in the correct folder strucutre. You can download it here on our lab’s website. Download the ZIP file on the page and unzip it. But, do not unzip any of the zip files within subfolders.
Your files should be structured in a way such that you have one main folder that contains within in, a subfolder for each participant. The name of each participant folder should be their ID number. In each “participant” subfolder should be all zip files containing their data, using the naming convention that E4 Connect uses (starttime_serialnumber.zip).
This step is where you extract and filter EDA data. It will output raw data, filtered data (using user-specified high and low pass filters + a butterworth filter), and filtered + feature-scaled ([0,1]) data. It will also provide summary data at the participant and session level.
Inputs: (1) List of participant numbers and (2) location where ZIP folders are stored.
Outputs: (1) one RDS file per participant with all data, (2) summary file that gives participant-level meta-data.
E4_EDA_Process.part1.ExtractRawEDA(participant_list=c(1001:1003),
ziplocation="~/Documents/E4tools_demo_data/data/",
rdslocation.EDA="~/Documents/E4tools_demo_data/output/raw_EDA/",
summarylocation="~/Documents/E4tools_demo_data/output/summaries/",
EDA_low_cut=0.001,LowPctCutoff=.75,
EDA_high_cut=25,HighPctCutoff=.75)
#> Starting participant 1001
#> 20 samples rejected (0.03% of all samples for this P)
#> Starting participant 1002
#> 123800 samples rejected (91.68% of all samples for this P)
#> Starting participant 1003
#> 0 samples rejected (0% of all samples for this P)| Participant | E4_serial | ts | EDA_raw | EDA_FeatureScaled | EDA_filtered | EDA_FeatureScaled_Filtered |
|---|---|---|---|---|---|---|
| 1002 | A004AD | 1509472714 | 0.008967 | 0.0038622 | 0 | 0.0545558 |
| 1002 | A004AD | 1509472714 | 0.008967 | 0.0038622 | 0 | 0.0545558 |
| 1002 | A004AD | 1509472714 | 0.008967 | 0.0038622 | 0 | 0.0545558 |
| 1002 | A004AD | 1509472714 | 0.010248 | 0.0044140 | 0 | 0.0545558 |
| 1002 | A004AD | 1509472715 | 0.008967 | 0.0038622 | 0 | 0.0545558 |
| 1002 | A004AD | 1509472715 | 0.008967 | 0.0038622 | 0 | 0.0545558 |
E4_EDA_Process.part4.BinMatchedEDA(participant_list=c(1001:1003),
rdslocation.MatchedEDA="~/Documents/E4tools_demo_data/output/matched_EDA/",
min.after = 20,min.before = 20,
rdslocation.BinnedMatchedEDA="~/Documents/E4tools_demo_data/output/")
#> Starting participant 1001
#> Starting participant 1002
#> Starting participant 1003| ID | PressTime | BeforeAfter | CaseControl | MinBeforeAfter | EDA_raw | EDA_filtered | EDA_FeatureScaled | NA |
|---|---|---|---|---|---|---|---|---|
| 1001 | 1516310123 | BEFORE | CASE | -20 | 2.328195 | 1.937228 | 0.2049962 | 0.1784975 |
| 1001 | 1516310123 | BEFORE | CASE | -18 | 3.790364 | 3.478413 | 0.3337393 | 0.3205033 |
| 1001 | 1516310123 | BEFORE | CASE | -16 | 4.786790 | 4.623852 | 0.4214740 | 0.4260448 |
| 1001 | 1516310123 | BEFORE | CASE | -14 | 4.896088 | 4.789263 | 0.4310976 | 0.4412859 |
| 1001 | 1516310123 | BEFORE | CASE | -12 | 5.376001 | 5.307053 | 0.4733537 | 0.4889954 |
| 1001 | 1516310123 | BEFORE | CASE | -10 | 5.453753 | 5.454288 | 0.4801997 | 0.5025618 |