get_activities: Extract active parts of dataframe

Description Usage Arguments Value See Also Examples

Description

extracts parts of an energy dataframe that include an activity and resting at the start and end of activity

Usage

1
2
get_activities(energy_df, buffer_start, buffer_end, scale,
  time_threshold = 15, rest_threshold = 5, all_activities = TRUE)

Arguments

energy_df

An energy data frame as returned by load_tcx_file.

buffer_start

The number seconds before activity included in profile.

buffer_end

The number seconds after activity included in profile.

scale

The number of data points in each third of the final profile.

time_threshold

The minumum number of seconds duration for an activity.

rest_threshold

The maximum number of resting seconds within an activity.

all_activities

Find all the activities in a energy data frame, otherwise find only the first one.

Value

List of energy type data frames containing the activity, a buffer at the start and a buffer at the end See load_tcx_dir for a description of an energy dataframe.

See Also

load_tcx_dir for a description of an energy dataframe. all_start_end_points for a method to get the start and end points of all activities.

Other get activity functions: all_start_end_points, start_end_points

Examples

1
2
3
get_activities(df, 500, 500, 500)
get_activities(df, 200, 200, 1000, time_threshold = 60)
get_activities(df, 1500, 500, 100, rest_threshold = 10)

VCCRI/CardiacProfileR documentation built on May 25, 2019, 2:22 p.m.