get_dists {rStrava} | R Documentation |
Get distance from longitude and latitude points
Description
Get distance from longitude and latitude points
Usage
get_dists(lon, lat)
Arguments
lon |
chr string indicating name of longitude column in |
lat |
chr string indicating name of latitude column in |
Details
Used internally in get_elev_prof
on objects returned by get_latlon
Value
A vector of distances with the length as the number of rows in dat_in
Author(s)
Daniel Padfield
Examples
## Not run:
# get activity data
stoken <- httr::config(token = strava_oauth(app_name, app_client_id, app_secret, cache = TRUE))
my_acts <- get_activity_list(stoken)
# get the latest activity
acts_data <- compile_activities(my_acts)[1, ]
# get lat, lon
polyline <- acts_data$map.summary_polyline
latlon <- get_latlon(polyline, key = mykey)
# get distance
get_dists(latlon$lon, latlon$lat)
## End(Not run)
[Package rStrava version 1.3.1 Index]