generate.physical.behaviour.summary: Generates a PDF that visualises a range of summary physical...

View source: R/activpal.physical.behaviour.summary.R

generate.physical.behaviour.summaryR Documentation

Generates a PDF that visualises a range of summary physical behaviour outcomes for a group of individuals.
Outcomes are also exported in two csv files, with outcomes aggregated by calendar day and EventsExended classified waking day / time in bed

Description

activity.summary.window processes all the extended events files (format *EventsEx.csv) in a folder and produces a chart showing a number of summary physical behaviour outcomes for the files. The outcomes are grouped into three groups:

  • Mean daily time in different posture classes (time in bed, sedentary, upright and stepping)

  • Volume based measures of activity participation (step count, stepping duration and intensity, time spent in different travel associated activities)

  • Measures of physical ability (time to first step, maximum step count, median cadence of stepping bouts containing short (< 1 minute) and long (> 1 minute) periods of stepping)

If matching rise time files (format *RiseSitData.csv) are included in the folder an additional column will be inserted to show the median rise time.

If the function is unable to process one or more of the extended events files, an additional file (yyMMMdd_HHMM_FileErrorList.csv) will be generated with a list of the extended events files that were not processed and details of the error that prevented the file from being processed. Extended events files modified in Microsoft Excel may fail to process.

The error message The Events Extended file had an unexpected format and could not be processed indicates the file may have been altered. For these files, Re-exporting the Events Extended file from PAL Analysis / PAL Batch may rectify the issue preventing the file from being processed.

Usage

generate.physical.behaviour.summary(
  input_folder,
  period_file = NULL,
  chart_title = NULL,
  output_folder = "",
  prefix_delimiter = NULL,
  prefix_length = NULL,
  fill_gaps = FALSE,
  minimum_wear_time = 20,
  anonymise = FALSE,
  generate_chart = TRUE,
  standard_scales = FALSE,
  sort_order = "MEDIAN_DAILY_STEP_COUNT"
)

Arguments

input_folder

The folder where the events files (format *EventsEx.csv) and optional rise time files (format *RiseSitData.csv) to be processed are saved.

period_file

The location of a csv files containing the details of custom periods to to be used when analysing the supplied events files.

If the location of a valid file is supplied the csv file with the suffix "_Custom_Summary" will be generated containing the outcomes using the supplied periods.

Each row defines a single observation for a single events file. The following columns must be in the spreadsheet.

filename - an identifier for the events file that the period is for. This should be the same as the identifier generated using the prefix_delimiter and prefix_length parameters

startime - the starting time of the period

endtime - the ending time of the period

The function will attempt to parse the supplied times in the following order "YYYY-mm-dd HH:MM", "YYYY-mm-dd HH:MM:SS", "YYYY-dd-mm HH:MM", "YYYY-dd-mm HH:MM:SS", "dd/mm/YYYY HH:MM", "dd/mm/YYYY HH:MM:SS", "mm/dd/YYYY HH:MM", "mm/dd/YYYY HH:MM:SS"

category - an idenfitier for the observation period (i.e. working day or time in bed)

chart_title

Character string; the file identifier for the generated PDF file.

output_folder

The folder where the physical behaviour summary report is to be saved. By default the report is saved in the current working directory

prefix_delimiter

Character string to be matched against the events file name when generating the file identifier. The generated identifier is the portion of the file name preceding the supplied string.

prefix_length

An integer that specifies the number of characters to take from the start of the events file name to generate the file identifier. If prefix_delimiter and prefix_length are both provided, the shortest file identifier that can be generated using the parameters is used. If neither prefix_delimiter or prefix_length are provided, the first six characters of the file name is used as the file identifier.

fill_gaps

Specifies if outcomes should be calculated for any time periods not explicitly specified by a period file. This parameter will only be used if a valid period file is supplied

minimum_wear_time

the minimum number of hours of valid wear

anonymise

logical; if true, set the file identifier as a non-identifiable string.

generate_chart

logical: if false the PDF chart is not generated and only the csv files with the outcomes reported per calendar day / waking day are generated

standard_scales

logical; if true, time-based axis limits are set at 24 hours. Using standard scales is likely to result in significant amounts of empty space.

sort_order

character string; selects the outcome measure that is used to sort the observations. By default, files are sorted by decreasing mean daily sedentary time.

Details

The following outcomes can be used to sort observations in the chart SEDENTARY_TIME, TIME_IN_BED, UPRIGHT_TIME, STEPPING_TIME, DAILY_SEDENTARY_BOUTS, DAILY_TIB_INTERRUPTIONS, STEPPING_BOUTS_UNDER_1_MIN, PEAK_2_MIN_STEPPING, PEAK_6_MIN_STEPPING, PEAK_12_MIN_STEPPING, DAILY_PEAK_30_SECOND_STEPPING, MEDIAN_DAILY_STEP_COUNT, MEDIAN_RISE_TIME, MEDIAN_CADENCE_TO_1_MINUTE , MEDIAN_CADENCE_1_MINUTE_PLUS, STEPPING_INTENSITY


PALkitchen/activPAL documentation built on July 18, 2023, 8:37 p.m.