bin_data {ActCR}R Documentation

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")

[Package ActCR version 0.2.0 Index]