I'm currently using ggmaps
to display a map of the location I'm trying to display points over but when I use the points function to try to add the points over the map it says that my list of latitudes and longitudes cannot be used for the arguments in x and y. Is there any better way to plot the points other than having to go one by one and individually code them onto my map?
Edit: Here's the data I'm working with right now and the first few lines of code that aren't working- -A table of 2 variables "lat" and "lon" that show all the points geocoded -A list of the addresses where the geo coordinates came from
mapTampa <- get_map(location = 'Tampa', zoom = 10)
points(lon, lat, col = "red", cex = 0.5)
The first line works and gives me the map but when I tried to add points thats when it gave me the x y error so I tried:
finalMap<-mapTampa+geom_point(aes(x=lon, y=lat, data=Filtered_Data))
Where latlong is my table with both latitudes and longitudes but that doesn't work either. I'm fairly new to R and this is my first project working with it but it seems like I've read everything about ggplot and ggmap and nothing is helping me.