I've been working for many time with tmap tool in r and have been learning a lot with my country's shape with multipolygons with provinces boundaries, Argentina (https://ramsac.ign.gob.ar/api/v1/capas-sig/Geodesia+y+demarcaci%C3%B3n/L%C3%ADmites/provincia/shp).
Suddenly, the maps couldn't run anymore, with the message: "Error in if (any(zeros)) {" where a value TRUE/FALSE is needed.
I tried to see which was the problem, so i tried to simplify by mapping:
library(tmap)
library(sf)
provIGN=st_read('provincia.shp')
tm_shape(provIGN)+tm_polygons()
#Got the same error
Then I localized that the problem was with one province, so i was able to graph the whole map except that particular province (Tierra del Fuego, Antártida e Islas del Atlántico Sur) by:
tm_shape(subset(provIGN,nam!="Tierra del Fuego, Antártida e Islas del Atlántico Sur"))+tm_polygons()
#Got the graph of Argentina without the problematic province.
So, finally I was able to get another shapefile of Argentina, where the limits where not the provinces but the departments (provinces > departments) and I could graph the whole country except the Antarctic department.
Is there a problem with those coordinates in particular? Is there a multipolygon that has a NULL value? As I said before the problem started all of a sudden, I could use both shapefiles with no problems before.
Thank you
PS. I was able to plot em on QGIS normally
After i asked the same in its GitHub page, thy recommended me to download the package and install it from there https://github.com/mtennekes/tmap/ and it works fine now.