filter_createdir_zip: Function to filter the data object based on the time period...

Description Usage Arguments Value

View source: R/cut_e4_data_intervals.R

Description

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.

Usage

1
2
3
4
5
6
7
8
filter_createdir_zip(
  data,
  time_start,
  time_end,
  interval,
  out_path = NULL,
  fn_name = NULL
)

Arguments

data

Object read with read_e4

time_start

User input start time in the character format "yyyy-mm-dd hh:mm:ss" / e.g., "2019-11-27 08:32:00". Where do you want the file cut to start?

time_end

User input end time (same format as time_start)

interval

# Interval: User input interval (in minutes/ e.g., 5) What is the duration of the interval you want to divide the period into? For example, the paper by de Looff et al. (2019) uses 5 minute intervals over a 30 minute period preceding aggressive behavior. The 5 minute interval is chosen as for the calculation of some of the heart rate variability parameters one needs at least 5 minutes of data.

out_path

The directory where to write the cut files; defaults to the input folder.

fn_name

The directory where to write the cut files without the extension.

Value

out_path fn_name


wearables documentation built on Dec. 20, 2021, 5:08 p.m.