Error in FUN(X[[i]], ...) : object 'visit.x' not found

When I use ggplot to show the map, yet the finally step can not finish. Moreover, the value of x can not show up.Could you help me to solve this question. Thank u! Code as follows:
setwd('D:/R
mydata<-read.csv("map data.csv",header=TRUE,sep=",")
visit.x<-mydata$Longitude
visit.y<-mydata$Latitude
library(ggplot2)
library(ggmap)
library(sp)
library(maptools)
library(maps)
mp<-NULL
mapworld<-borders("world",colour = "gray50",fill="white")
mp2<-mp+geom_point(aes(x=Latitude=visit.x,y=visit.y,size=mydata$number),color="darkorange")+scale_size(range=c(2,9))+ggtitle("plot name")+theme(plot.title=element_text(size=25,color="red",face="italic"))+theme_grey(base_size = 32)
mp3<-mp2+theme(legend.position = "none")
mp3
The error is:

mp3
Error in FUN(X[[i]], ...) : object 'visit.x' not found

Hi,

Welcome to the RStudio community!

In order for us to help you with your question, please provide us a minimal reproducible example where you provide a minimal (dummy) dataset and code that can recreate the issue. Once we have that, we can go from there. For help on creating a Reprex, see this guide:

Good luck!
PJ

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.