class: center, middle, inverse, title-slide .title[ # Geospatial Analysis with R ] .subtitle[ ## Class 2 ] --- ```r library(ggmap) load("external/data/gkey.rda") m <- get_googlemap(center = c(-71.8229, 42.2511), zoom = 17, maptype = "hybrid", key = gkey) mp <- ggmap(m, extent = "device") ggsave(filename = "external/slides/figures/clark.png", plot = mp, bg = "transparent", width = 4, height = 4, units = "in", dpi = 300) ``` --- - Installation progress/trouble-shooting - `R` packages - `git` / GitHub - Tips and tricks for productivity --- # R packages - File structure - Where packages live - library versus package - Exported functions, loading packages --- ## Types of packages <div class="figure" style="text-align: center"> <img src="http://r-pkgs.had.co.nz/diagrams/package-files.png" alt="http://r-pkgs.had.co.nz/package.html" width="70%" /> <p class="caption">http://r-pkgs.had.co.nz/package.html</p> </div> --- ## Installing packages <div class="figure" style="text-align: center"> <img src="http://r-pkgs.had.co.nz/diagrams/installation.png" alt="http://r-pkgs.had.co.nz/package.html" width="90%" /> <p class="caption">http://r-pkgs.had.co.nz/package.html</p> </div> --- # git / GitHub - Commits, pushes, pulls - Branching - Merging --- # Tips and Tricks - Tab completion and shortcuts - Reusing code - Code syntax - [Posting guide](https://www.r-project.org/posting-guide.html)