diurnality {digiRhythm}R Documentation

Computes the diurnality index based on an activity dataframe

Description

Computes the diurnality index based on an activity dataframe

Usage

diurnality(
  data,
  activity,
  day_time = c("06:30:00", "16:30:00"),
  night_time = c("18:00:00", "T05:00:00"),
  save = NULL
)

Arguments

data

a digiRhythm-friendly dataset

activity

The number of non-useful lines to skip (lines to header)

day_time

an array containing the start and end of the day period. Default: c("06:30:00", "16:30:00").

night_time

an array containing the start and end of the night period. Default: c("18:00:00", "T05:00:00").

save

if NULL, the image is not saved. Otherwise, this parameter will be the name of the saved image. it should contain the path and name without the extension.

Value

A dataframe with 2 col: date and diurnality index

Examples

data("df516b_2", package = "digiRhythm")
data <- df516b_2
data <- remove_activity_outliers(data)
activity = names(data)[2]
d_index <- diurnality(data, activity)


[Package digiRhythm version 1.1 Index]