append_dailies: Function to add daily data to WRAP data for a list of daily...

View source: R/read_WRAP.R

append_dailiesR Documentation

Function to add daily data to WRAP data for a list of daily variables

Description

Function to add daily data to WRAP data for a list of daily variables

Usage

append_dailies(data, wrap, dailies)

Arguments

data

A data frame in wide format containing multiple daily variables. This data must include an ID variable named 'id' with integer values starting at 1 to match the default ID variable naming used by WRAP.

wrap

WRAP data produced by 'read_wraps' (e.g., sleep, activity, or stress)

dailies

A list of daily variable names 'e.g., list(c(x_1, x_2, ..., x_t), c(y_1, y_2, ..., y_2))' where names are in the format 'varName_#', where '#' are integers that overlap with the range of values in the WRAP data variable 'time_days', e.g. 'range(sleep$time_days)'.


ICTatRTI/PersonAlytics documentation built on Dec. 13, 2024, 11:06 p.m.