我正在尝试使用 googleway 库从 googlemaps 中提取数据。我在应用 R 函数中使用了 Google Elevation API
Requests <- apply(df, 1, function(x){
google_elevation(df_locations =x[c("lat", "lon")],
location_type = "individual",
key = key,
simplify = TRUE)
})
但我收到以下错误
df_locations should be a data.frame containing at least two columns of lat and lon coordinates
在函数中选择 df 列我做错了什么?
谢谢