Learn R Programming

lifelogr (version 0.1.0)

agg_sleep_weekday: A function to preprocess sleep data for the Person object.

Description

Preprocesses data to be used by the plot_sleep_weekday() function. Specifically, it calculates the sleep duration and time asleep for each day of the week (in hours).

Usage

agg_sleep_weekday(person)

Arguments

person
An instance of the Person class

Value

A tidy data frame with the columns weekday, measure, and hours

Examples

Run this code
data(EX)
agg_sleep_weekday(person = EX)

Run the code above in your browser using DataLab