I'm new to R and trying to create some maps showing prevalence using tmap. I managed to create the map using this same code yesterday, but trying today am getting this error message:
Map.with.points <- map.Tur+
tm_shape(Turkana_clusters.sf)+
tm_bubbles("prev.adj",col = "prev.adj",
border.col = "black",
style="fixed",
breaks=c(0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8),
palette="-viridis",
title.size="Prevalence",
scale = 1,
title.col="")
Map.with.points+
tm_compass(type="8star",
position = c("right","top"))
Map.with.points+
tm_scale_bar(breaks = c(0,20,40),text.size=1,
position=c("centre","bottom"), size=0.5)`
Error in grid.Call.graphics(C_setviewport, vp, TRUE) : non-finite location and/or size for viewport
I can't find any solutions for this specifically for tmap online. Any help very gratefully received!