I'm trying to pull data from googlemaps with googleway library.I used Google Elevation API in apply R function
Requests <- apply(df, 1, function(x){
google_elevation(df_locations =x[c("lat", "lon")],
location_type = "individual",
key = key,
simplify = TRUE)
})
but I get the following error
df_locations should be a data.frame containing at least two columns of lat and lon coordinates
What am i doing wrong with selecting df columns in function?
Thanks