Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bin_data

Bin data into longer windows


Description

Bin minute level data into different time resolutions

Usage

bin_data(x = x, window = 1, method = c("average", "sum"))

Arguments

x

vector of activity data.

window

window size used to bin the original 1440 dimensional data into. Window size should be an integer factor of 1440

method

character of "sum" or "average", function used to bin the data

Value

a vector of binned data

Examples

data(example_activity_data)
count1 = c(t(example_activity_data$count[1,-c(1,2)]))
xbin = bin_data(x = count1, window = 10, method = "average")

ActCR

Extract Circadian Rhythms Metrics from Actigraphy Data

v0.2.0
GPL-3
Authors
Junrui Di [aut, cre], Vadim zipunnikov [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.