8.7 Visual Outputs
R supports many different static and interactive graphics formats. The most general method to save a static plot is to open a graphic device, create a plot, and close it
png(filename = "lifeExp.png", width = 500, height = 350)
plot(world["lifeExp"])
dev.off()
Other available graphic devices include pdf()
, bmp()
, jpeg()
, and tiff()
.
tmap
has tmap_save()
mapview
has mapshot()
Much more to come in the next chapter.