“ +”的不兼容方法(“ Ops.raster”,“ +。gg”)和二进制运算符的非数字参数

时间:2019-06-27 16:18:51

标签: r binary raster numeric

所以我的错误信息是:

library(ggplot2)
df <- data.frame(stringsAsFactors=FALSE, INTER1 = c(1, 2, 3, 4, 7, 8),    LATITUDE = x, LONGITUDE = y)

eastern_map +
geom_point(data = df, aes(x = LONGITUDE, y = LATITUDE, color = INTER1), size=1, alpha=0.5) +
theme(legend.position = "bottom")

小插曲:8 x 3

INTER1 LATITUDE LONGITUDE

1     2 8.11 -11.6
2     2 8.11 -11.6
3     2 7.96 -11.7
4     2 7.96 -11.7
5     2 7.96 -11.7
6     2 7.96 -11.7
7     4 7.62 -11.8
8     1 7.61 -11.8

Error in eastern_map + geom_point(data = df, aes(x = LONGITUDE, y = LATITUDE, :
non-numeric argument to binary operator
In addition: Warning message:
Incompatible methods ("Ops.raster", "+.gg") for "+"

0 个答案:

没有答案