agg.sleepsight: agg.sleepsight

Description Usage Arguments Value

View source: R/agg.sleepsight.R

Description

agg.sleepsight

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
agg.sleepsight(
  aggregatefile,
  csvfile,
  surveyfile,
  desiredtz,
  minmisratio = 1/3,
  shortwindow = 1,
  longwindow = 30,
  withings.mode = "dd",
  startDate = c(),
  endDate = c()
)

Arguments

aggregatefile

RData file where the output of aggregation will be stored.

csvfile

csv file where data overview was stored

surveyfile

RData file where the preprocessed survey data is stored

desiredtz

timezone (character) in Europe/London format

minmisratio

minimum missing ratio per day, day will be ignored if more data is missing

shortwindow

short window length in minutes to aggregate to

longwindow

long window length in minutes to aggregate to

withings.mode

character ("pdk", "dd") to indicate whether to prioritise pdk or dd

startDate

Character, optional argument to specify the startDate of the recording, e.g. 2019-01-01

endDate

Character, optional argument to specify the startDate of the recording, e.g. 2019-01-01

Value

List with data frames that hold the aggregated data: D24HR, Dshort, Dlong, and Dsurvey. Note that sleepdur_night starts at noon and continous to the noon on the following day.


wadpac/sleepsight-analytics-pipeline documentation built on Aug. 1, 2020, 10:41 a.m.