if (interactive()) {
if (requireNamespace("rworldmap", quietly = TRUE)) {
world <- rworldmap::getMap(resolution = "coarse")
p <- l_plot()
lmap <- l_layer(p, world, asSingleLayer=TRUE)
l_scaleto_world(p)
attr(lmap,'hole')
attr(lmap,'NAME')
}
}
Run the code above in your browser using DataLab