Learn R Programming

rStrava (version 1.3.1)

get_spdsplits: Get speed splits in a dataframe

Description

Allows the return of speed splits of multiple rides.

Usage

get_spdsplits(act_id, stoken, units = "metric")

Value

a data frame containing the splits of the activity or activities selected.

Arguments

act_id

a vector of activity IDs. These are easily found in the data.frame returned by compile_activities

stoken

A config object created using the strava_oauth function

units

chr string indicating plot units as either metric or imperial

Author

Marcus Beck

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)

# compile activities
acts_data <- compile_activities(my_acts)

# get spdsplits for all activities
spd_splits <- purrr::map_df(acts_data$id, get_spdsplits, stoken = stoken, 
     units = 'metric', .id = 'id')
}

Run the code above in your browser using DataLab