我正在尝试在R中的geosphere包中使用distVincentyEllipsoid函数来计算我的数据框中不同点之间的距离,遵循Calculate total miles traveled from vectors of lat / lon给出的示例。但是,我不断收到错误“。在错误在.pointsToMatrix(p1):纬度> 90”,即使我所有的纬度都远小于90.可能是什么问题?请帮忙
答案 0 :(得分:0)
我只是遇到了同样的问题。检查您是否输入数据为c(LONG,LAT)。我错误地使用了更常见的c格式(LAT,LONG)。
答案 1 :(得分:0)
我还要补充一点,你应该检查一下NAs。我将一组邮政编码对坐标进行了地理编码,由于某些拉链已经过时(至少我认为发生了这种情况),因此无法生成坐标。
如果你跑:
range(p1[2])
并获取
NA NA
然后这是一个很好的指示。
答案 2 :(得分:0)
遇到同样的问题,用as.numeric解决:
@bot.event
async def on_command_error(error, ctx):
if isinstance(error, commands.NoPrivateMessage):
await bot.send_message(ctx.message.channel, "**private messages.** " + ctx.message.author.mention)
if isinstance(error, commands.MissingRequiredArgument):
await bot.send_message(ctx.message.channel, "**Missing an argument:** " + ctx.message.author.mention)
elif isinstance(error, commands.DisabledCommand):
await bot.send_message(ctx.message.channel, "** Command is disabled.** " + ctx.message.author.mention)
elif isinstance(error, commands.CheckFailure):
await bot.send_message(ctx.message.channel, "**no permission.** " + ctx.message.author.mention)
elif isinstance(error, commands.CommandNotFound):
await bot.send_message(ctx.message.channel, "**wrong command.** " + ctx.message.author.mention)