我正在绘制项圈动物如何使用递归包利用水点,并通过此处提供的代码工作,我的数据替换了 Leo 的数据:http ://dx.doi.org/10.5441/001/1.46ft1k05 我目前正在尝试根据最常访问的位置映射运动。但是,我在 UseMethod“bbox”中不断收到错误。
当我使用 show(leoGeo) 时,它以 Move 对象的形式返回,并且我已启用并注册了 Google API 密钥。我已经加载了 recurse、move、ggplot2、ggmap、RgoogleMaps、raster、scales、viridis、lubridate、reshape2、raster、rworldmap、aptools、cluster、amt、sp、rgdal、curl 和 dplyr。
leovisit50 = getRecursions(leo.df, 50)
revisitThreshold = 75
leoGeo.map.df = as(leoGeo,'data.frame')
leoGeo.map.df$revisits = leovisit50$revisits
当我去使用这个命令时
map.leoGeo = qmap(bbox(extent(leoGeo[leovisit50$revisits >
revisitThreshold,])), zoom = 13, maptype = "road.Dist")
它不断返回下面的错误
Error in UseMethod("bbox", x) :
no applicable method for 'bbox' applied to an object of class "Extent"
(如果需要,我可以为此提供完整的代码,这只是我遇到困难的 map.leoGeo 行)。
我是运动分析的新手,不知道如何解决这个问题,任何帮助将不胜感激!