"Error in FUN(X[[i]], ...) : object 'group' not found" error code while plotting a map

I got this error code while plotting a graph for a species occurrence:
Regions defined for each Polygons
Error in FUN(X[[i]], ...) : object 'group' not found

and this is my code:
ggplot()+
geom_polygon(data = land50, aes(x=long, y=lat, group=group), fill="gray")+
geom_polygon(data = svulgarisdata, aes(x=long, y=lat, group=group), fill="pink")

Does your land50 and svulgarisdata have a group variable?

We can't help you much as you haven't provided a reprex (reproducible example).

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.