Closed ebossert closed 2 years ago
Hi @ebossert ,
Let's check previous code chunks. In the code chunks prior to this did you run code for "cluster" and "cluster2"? You have a line of code in this chunk for det_dorling$cluster3 <- as.factor( fit3$classification ). Check your code chunks prior to this and make sure you have both:
det_dorling$cluster <- as.factor( fit$classification )
and
det_dorling$cluster2 <- as.factor( fit2$classification )
@JasonSills Thank you!
This was totally user error. I skipped running the code chunk with det_dorling$cluster <- as.factor( fit$classification ) because it takes so long and didn't even think about the potential consequences. Not doing that again!
Hi @ebossert ,
Let's check previous code chunks. In the code chunks prior to this did you run code for "cluster" and "cluster2"? You have a line of code in this chunk for det_dorling$cluster3 <- as.factor( fit3$classification ). Check your code chunks prior to this and make sure you have both:
det_dorling$cluster <- as.factor( fit$classification )
and
det_dorling$cluster2 <- as.factor( fit2$classification )
hey sir i have the same problem,can you help me?
this is my script legend_title = expression("Fixed: Local R2") map_fbgwr1 = tm_shape(Krucil_shp1, bbox = bbox_new)+ tm_fill(col = "fmb__localR2", title = legend_title, palette = magma(256), style = "cont")+ tm_borders(col = "white", lwd= .1)+ tm_compass(type = "arrow", position = c("left","top"), size = 3) + tm_scale_bar(breaks = c(0,1,2), text.size = 0.7, position = c("left","bottom"))+ tm_layout(bg.color = "white") map_fbgwr1+tm_shape(Krucil_shp1)+ tm_borders(col = "blue", lwd = .5)
after i run tm_borders this come up Error: Fill argument neither colors nor valid variable name(s)
I get the titled error when I run the code chunk below. I've googled it but I'm still unclear on what is causing the error. All I changed is the first line for my city dorling, and the error refers to the last line of tmap_arrange. When I remove the tmap_arrange line it returns this:
tmap mode set to plotting tmap style set to "cobalt" other available styles are: "white", "gray", "natural", "col_blind", "albatross", "beaver", "bw", "classic", "watercolor"
Error: Fill argument neither colors nor valid variable name(s)