我正在尝试复制ggmap教程中的一个示例。代码如下:
library(dplyr)
library(forcats)
`%notin%` <- function(lhs, rhs) !(lhs %in% rhs)
violent_crimes <- crime %>%
filter(
offense %notin% c("auto theft", "theft", "burglary"),
-95.39681 <= lon & lon <= -95.34188,
29.73631 <= lat & lat <= 29.78400
) %>%
mutate(
offense = fct_drop(offense),
offense = fct_relevel(offense,
c("robbery", "aggravated assault", "rape", "murder")
)
)
qmplot(lon, lat, data = violent_crimes, maptype = "toner-lite", color = I("red"))我得到的只是一个错误,内容如下:
Error in match(names(x), .all_aesthetics) : object '.all_aesthetics' not found我使用的是ggmap版本2.6.1
https://stackoverflow.com/questions/51455936
复制相似问题