chartr(“”,“ +”,location)错误:'utf8towcs'中无效的输入'XXXXXXX'

时间:2018-08-24 04:29:03

标签: r ggmap geocode

我有一个带地址的data.frame(df)。我想对它们进行地理编码。我的代码:

for(i in 1:nrow(df))
{
  # Print("Working...")
  result <- geocode(df$address[i], output = "latlona", source = "google")
  df$lon[i] <- as.numeric(result[1])
  df$lat[i] <- as.numeric(result[2])
}

输出和错误如下:

 Error in chartr(" ", "+", location) : 
  invalid input 'Joaquín Requena esquina Charrúa 1111' in 'utf8towcs'
In addition: Warning messages:
1: geocode failed with status ZERO_RESULTS, location = "a pasos de OSE 0000" 
2: geocode failed with status ZERO_RESULTS, location = "Luis Galvani 1111" 

有帮助吗?

谢谢!

0 个答案:

没有答案