compile_activities: converts a list of activities into a dataframe

View source: R/compile_activities.R

compile_activitiesR Documentation

converts a list of activities into a dataframe

Description

converts a list of activities into a dataframe

Usage

compile_activities(actlist, acts = NULL, id = NULL, units = "metric")

Arguments

actlist

an activities list returned by get_activity_list

acts

numeric indicating which activities to compile starting with most recent, defaults to all

id

optional character vector to specify the id(s) of the activity/activities to plot, acts is ignored if provided

units

chr string indicating metric or imperial

Details

each activity has a value for every column present across all activities, with NAs populating empty values

Value

An activities frame object (actframe that includes a data frame for the data and attributes for the distance, speed, and elevation units

Author(s)

Daniel Padfield

See Also

compile_club_activities for compiling an activities list for club activities

Examples

 
## Not run: 
stoken <- httr::config(token = strava_oauth(app_name, app_client_id, app_secret, cache = TRUE))

my_acts <- get_activity_list(stoken)

acts_data <- compile_activities(my_acts)

# show attributes
attr(acts_data, 'unit_type')
attr(acts_data, 'unit_vals')

## End(Not run)

rStrava documentation built on Oct. 23, 2024, 5:06 p.m.