Hi ! I am new on R studio and I cannot put my variable (TXPAUVR which represents the percent of poverty in NIcaragua) on my map.
I can visualize the map :
mf_map(x=NIC, col = "white", border = "black")
But then I cannot add my variable :
NEW <- NEW %>%
theme(panel.border=element_blank(), axis.line = element_line())
mf_map(x = NEW,
var = "TXPAUVR",
type = "choro",
pal = viridis(3),
breaks = BK1,
leg_title = "Taux de pauvreté",
leg_pos = "topleft",
add = TRUE)
The error either is : Error in if (xtype == "LINE") { : missing value where TRUE/FALSE needed
Or : Error in x[[var]] : attempt to select less than one element in get1index
Or : Error in st_sfc(crs = crs) :
is.numeric(crs) || is.character(crs) || inherits(crs, "crs") is not TRUE
Apparently there is a problem with the class of my Data frame (NEW) in which I put the TXPAUVR variable. It refuses to be considered as "numeric".
Could you help me to solve on eof these errors ? I would be very grateful...