Home

Manipulating Maps and Images with R

|
Updated:  
2018-03-02 18:49:10
|
From The Book:  
Statistical Analysis with R Essentials For Dummies
Explore Book
Buy On Amazon
Here are some packages and functions to help you get started using R to draw maps and to process images.

Packages and Functions for Plotting Maps and for Processing Images

Package Function What it does
maps map_data() Returns a data frame of latitudes and longitudes
ggmaps geocode() Returns latitude and longitude of a place-name
magick image_read() Reads an image into R and turns it into a magick object
magick image_resize() Resizes an image
magick image_rotate() Rotates an image
magick image_flip() Rotates an image on a horizontal axis
magick image_flop() Rotates an image on a vertical axis
magick image_annotate() Adds text to an image
magick image_background() Sets the background for an image
magick image_composite() Combines images
magick image_morph() Makes one image appear to gradually become (morph into) another
magick image_animate() Puts an animation into the RStudio Viewer window
magick image_apply() Applies a function to every frame in an animated GIF
magick image_write() Saves an animation as a reusable GIF

About This Article

This article is from the book: 

About the book author:

Joseph Schmuller, PhD, is a cognitive scientist and statistical analyst. He creates online learning tools and writes books on the technology of data science. His books include R All-in-One For Dummies and R Projects For Dummies.