在r中将Lat / Long转换为Zip代码

时间:2018-01-27 00:40:29

标签: r

运行此代码时:

library(ggmap)

ppt=read.csv("~/Downloads/PPT.csv")
test=ppt$the_geom
address=revgeocode(location=c(test),output="address")

我一直收到错误:

is.numeric(location) && length(location) == 2 is not TRUE

变量the_geom的列在csv文件中看起来像这样

- POINT (-73.8981682368399 40.74955730896312)
- POINT (-74.00004690644528 40.73207708606329)
- POINT (-73.98604698388607 40.732806345432046)
...

我猜我因POINT ()而收到错误。我该如何解决这个错误?

0 个答案:

没有答案