Giving a talk up at Temple University, last seminar of the year but one I’ve been looking forward to giving for a while.

# R

Materials and routines related to the R programming environment.

## Collab <- Slack + R

## Intalling Shiny Server on Ubuntu 14 LTS

OK, so I just ‘found‘ shiny and it has a lot of cool stuff to it. OK, I’ve known about it for a long time but have just had the opportunity to sit down and work it out and see how it can fit into the presentation and learning I’m trying to develop in my Applied Population Genetics online textbook. Here is a brief overview of how I set up the shiny server on my Ubuntu box that is hosting the book (so I can embed more interactivity in the display).

## Layered Maps in R (Using GGPlot of course…)

A very cool writeup on making blow out maps.

http://urbandemographics.blogspot.co.uk/2016/04/creating-tilted-and-stacked-maps-in-r.html

## RStudio Cheatsheets

Here are some very useful cheat sheets put out by RStudio. A great resource of information!

## Volume 0 – On iBooks Store

## Buffers & Convex Hulls

An analysis common to modern population genetics is that of finding ecological distances between objects on a landscape. The estimation of pairwise distance derived from spatial data is a computationally intensive thing, one that if you are not careful will bring your laptop to its knees! One way to mitigate this data problem is to use a minimal amount raster area so that the estimation of the underlying distance graph can be done on a smaller set of points. This example provides a simple solution using convex hulls. Jump below for the complete example.

## Cropping Rasters

It is often the case that the raster we are working with is not the exact size of the area from which our data are collected. It is a much easier situation if the raster is larger than the area than if you need to stitch together two raster Tiles to get all your data onto one extent. In my doctoral thesis work, the area of the southern Ozark mountains that my sites were in was not only straddling a boundary between existing rasters, it was also at the boundary of two UTM zones! What a pain.

## Raster Plotting

A raster is essentially an image, whose pixel size correspond to a particular spatial extent and the data contained within each pixel represents a particular feature on the landscape. Common rasters are DEM’s (measuring elevation), rainfall, temperature, buildings, etc. In R, it is common to think of rasters as matrices whose values measure some feature on the landscape. In this section, we will examine how to acquire, load, manipulate, and extract data from raster objects.

## Effective Population Size

How big is the data set you are analyzing? Apparently it depends on how you count…