hello code is giving error i didnot get the point why its not runing plot. please help
library(sf)
#> Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3
set.seed(100)
X=7.5
Y=7.5
f = function(){
a = runif(10,1,10)
return( a=as.integer(a))
}
onlineloc=data.frame(x=f(),y=f())
instore=data.frame(a=f(),b=f())
store=data.frame(X,Y)
plot(x,y,main="Online and instore customer loc",col=" red")
#> Error in plot(x, y, main = "Online and instore customer loc", col = " red"): object 'x' not found
points(a,b,pch=2)
#> Error in points(a, b, pch = 2): object 'a' not found
points(X,Y,pch=15)
#> Error in plot.xy(xy.coords(x, y), type = type, ...): plot.new has not been called yet
legend(x=3.5,y=5,legend=c("Instore Customer","Online Customer","Store"),pch=c(2,1,15),col=c("black","red","black"))
#> Error in strwidth(legend, units = "user", cex = cex, font = text.font): plot.new has not been called yet
#plot(onlineloc,main="Online customer loc",col=" red")
Created on 2019-10-20 by the reprex package (v0.3.0)