activity.with.overlay.chart {activPAL}R Documentation

Combines events file data with observational data for a single events file

Description

Reads in an events file and overlay file, generating spiral and linear charts aligning the events file data with the corresponding overlay data. Where the overlay data is non-continuous data (such as sleeps diaries) the csv file should have the columns start_time (dd-mm-YYYY HH:MM), end_time (dd-mm-YYYY HH:MM) and category (text). Where the overlay data is continuous data (such as continuous glucose monitoring) the csv file should have the columns start_time(dd-mm-YYYY HH:MM) and category (text). In this case the end time coincides with the start time of the subsequent observation. The charts are saved as png images with two images generated (one spiral chart and one linear chart).
Note: Spiral plots are generated using ggplot2 and coord_polar() and can take 45 - 60 seconds to generate each spiral plot.

Usage

activity.with.overlay.chart(events_file, overlay_file, output_folder)

Arguments

events_file

The filepath of the events file. Must be a valid activPAL events csv file

overlay_file

The filepath of the csv file containing the overlay data csv file

output_folder

The filepath of the folder where the generated chart are to be saved to

Examples

events_file <- system.file("extdata", "Test_Events.csv", package = "activPAL")
sleep_file <- system.file("extdata", "Sleep.csv", package = "activPAL")
output_folder <- paste(tempdir(),"/",sep="")

activPAL::activity.with.overlay.chart(events_file,sleep_file,output_folder)

[Package activPAL version 0.1.3 Index]