get_dists | R Documentation |
Get distance from longitude and latitude points
get_dists(lon, lat)
lon |
chr string indicating name of longitude column in |
lat |
chr string indicating name of latitude column in |
Used internally in get_elev_prof
on objects returned by get_latlon
A vector of distances with the length as the number of rows in dat_in
Daniel Padfield
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.