Learn R Programming

Overview

wearables

Functions for analyzing empatica e4 data, pre-process the signals, detect artifacts and create several features for analysis.

This package was created for signal analysis of the Empatica E4 wearables device. It allows users to read in an E4 zip file from Empatica connect into a list. The package was created to detect artifacts and extract features that can be used for analysis.

  • 'read_e4()' is the first function that can be used to read Empatica E4 data into a list.

If you are new to Empatica E4, the best place to start is the website from Empatica or the accompanying website for the Shiny tool .

Installation

#install the wearables package:
install.packages("wearables")

Examples

library(wearables)

#read_e4("Your filepath to zip-file here")

Getting help

If you encounter a clear bug, please file an issue with a minimal reproducible example on GitHub.

Copy Link

Version

Install

install.packages('wearables')

Monthly Downloads

164

Version

0.8.1

License

GPL-2

Maintainer

Peter de Looff

Last Published

December 20th, 2021

Functions in wearables (0.8.1)

compute_wavelet_coefficients

Wavelet coefficients
e4_filecut_intervals

Filter datasets for a Datetime start + end
create_e4_output_folder

Output folder
get_rise_time

Rise time of peaks
find_peaks

Function to find peaks of an EDA datafile
get_half_rise

Half rise time
get_i_apex_with_decay

Decaying peaks
get_SCR_width

Peak width
get_second_derivative

Second derivative
get_amp

Peak amplitude
binary_classifier_config

Configuration of the SVM algorithm for binary classification
compute_wavelet_decomposition

Wavelet decomposition
filter_createdir_zip

Function to filter the data object based on the time period and intervals that are needed for the files to be cut. The function also creates identical Empatica E4 zipfiles in the same directory as where the original zipfile is located.
filter_e4data_datetime

Filter all four datasets for a Datetime start + end
compute_features2

Features computation
compute_derivative_features

Derivative features
get_peak_start_times

Peak start times
process_eda

Process EDA data
get_half_amp

Half peak amp
get_peak_start

Start of peaks
print.e4data

Show class of object
get_eda_deriv

Electrodermal activity signal derivative
get_max_deriv

Maximum derivative
get_kernel

SVM kernel
remove_small_peaks

Small peaks removal
upsample_data_to_8Hz

Upsample EDA data to 8 Hz
get_decay_time

Decay time
write_processed_e4

Write CSV files of the output
read_e4

Read E4 data
ibi_analysis

IBI analysis
get_derivative

First derivative
get_apex

Get the eda apex of the signal
predict_binary_classifier

Binary classifiers
max_per_n

Max value per segment of length n
multiclass_classifier_config

Configuration of the SVM algorithm for ternary classification
plot_artifacts

Artifact plots
pad_e4

pad_e4
get_peak_end

Peak end
get_peak_end_times

Peak end times
read_and_process_e4

Read, process and feature extraction of E4 data
rbind_e4

Row-bind E4 datasets
predict_multiclass_classifier

Ternary classifiers
prepend_time_column

prepend_time_column
choose_between_classes

Choice between two classes
batch_analysis

Batch analysis
as_timeseries

Convert an E4 data stream to a timeseries
add_chunk_group

Addition of chunk groups
aggregate_e4_data

Aggregate E4 data into 1min timesteps
calculate_RMSSD

RMSSD calculation
as_time

as_time
compute_amplitude_features

Amplitude features
char_clock_systime

Force character datetime variable ("yyyy-mm-dd hh:mm:ss") to system timezone