interval_aggregation: Aggregate the raw data into an equally-spaced data frame

Usage Arguments

View source: R/interval_aggregation.R

Usage

1
2
3
interval_aggregation(data, variable, ID, timestamp,
  format = "%Y-%m-%dT%H:%M:%S", interval = 60,
  aggregatefun = sum, is.na.zero = TRUE, remove.na = TRUE)

Arguments

data

Data in a data.frame format

variable

Name of variable in the data set you would like to re-structure

ID

Name of ID variable in the data set

timestamp

Name of time variable in the data set

format

Date/time format of timestamp. Default is "

\item

intervalThe interval of time in minute. Default is 60 (i.e. The measurement is evaluated every hour.)

\item

aggregatefunFunction used for aggregation. Default is sum.

\item

is.na.zeroIf TRUE, NA is considered as 0. If FALSE, the NA is considered as missing. Defulat is TRUE.

\item

remove.naIf TRUE, the NAs will be removed in the aggregated data. Defulat is TRUE.

Aggregate the raw data into an equally-spaced data frame


jihuilee/mhealth documentation built on Jan. 1, 2021, 5:30 a.m.