pool_user_data: Pool user data

Description Usage Arguments Value

View source: R/utils_pool_user_data.R

Description

This is a background function that is rarely called by analysts directly. It takes a hyfe object created by a call to process_hyfe_data() in which the argument by_user was set to TRUE such that each user's data was proessed separately, and pools all the user data together. It main application is for certain plotting functions.

Usage

1
pool_user_data(ho_by_user, group_users = TRUE, verbose = TRUE)

Arguments

ho_by_user

A hyfe object, which is generated by process_hyfe_data(). This function only accepts hyfe objects processed with by_user = TRUE. See full details and examples in the package vignette.

group_users

If TRUE (the default), the timetables produced will pool all users together, as implied by the function's name. For example, the hours output will have a single row for each hour in the monitoring period. If FALSE, the hours table will have a row for each user-hour, with a column uid containing the Firebase UID for the user. This option is not often useful, but it may be for certain analyses.

verbose

Print status updates?

Value

A list with the three timetable slots you expect in a hyfe object in which all users are pooled together: hours, days, and weeks. See the vignette for details on these tables.


hyfe-ai/hyfer documentation built on Dec. 20, 2021, 5:53 p.m.