| tm_check_fix | R Documentation |
Checks whether the geometries of the shapes specified via tm_shape() are
valid. Invalid geometries can cause errors or maps with artifacts.
tm_check_fix()
This tmap element checks the geometries with sf::st_is_valid() and, if
needed, applies sf::st_make_valid(). If that is unsuccessful, it toggles the
s2 backend of the sf package (on or off, depending on whether it was
already enabled) and tries again. If the geometries are still invalid, the map
is drawn with a warning and the invalid geometries are removed.
A tmap element.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.