Learn R Programming

rStrava (version 1.2.0)

plot_spdsplits: Plot speed by splits

Description

Plot average speed by splits for a single activity

Usage

plot_spdsplits(act_data, ...)

# S3 method for list plot_spdsplits( act_data, stoken, acts = 1, id = NULL, units = "metric", fill = "darkblue", ... )

# S3 method for default plot_spdsplits(act_data, stoken, units = "metric", fill = "darkblue", ...)

Value

plot of average distance for each split value in the activity

Arguments

act_data

an activities list object returned by get_activity_list or a data.frame returned by compile_activities

...

arguments passed to other methods

stoken

A config object created using the strava_oauth function

acts

numeric indicating which activity to plot based on index in the activities list, defaults to most recent

id

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

units

chr string indicating plot units as either metric or imperial

fill

chr string of fill color for profile

Author

Marcus Beck

Details

The average speed per split is plotted, including a dashed line for the overall average. The final split is typically not a complete km or mile.

Examples

Run this code
if (FALSE) {
# get my activities
stoken <- httr::config(token = strava_oauth(app_name, app_client_id, app_secret, cache = TRUE))
my_acts <- get_activity_list(stoken)

# default
plot_spdsplits(my_acts, stoken, acts = 1)
}

Run the code above in your browser using DataLab