Population Graph Stability

A population graph is a network structure based upon inter-stratum conditional genetic covariance (see Dyer & Nason 2004 for a more complete discussion). In this context, it is often of interest to know the statistical stability of your loci in determining the topology you see in the popgraph. Here is a way to subsample the loci you have and identify the extent to which you are asymptotically estimating a stable topology.

Applied Environmental Statistics

This semester, I’ll be leading a graduate course in applied ecological statistics. Should be a lot of fun getting a group of people up to speed on the benefits of being an R guru! https://sites.google.com/a/vcu.edu/applied-environmental-statistics

Collab <- Slack + R

I just ran across an R package that allows you to integrate your R workflow into the Slack environment. Really cool. Below I show how to set it up and to post output of your analyses to slack channels for your team as well as to register notifications.

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).

Presentation Zen

Here it is, time for student presentations all around! I thought it would be nice to send this presentation around again to remind everyone what make good (and sucky) presentations. More below the fold.


The program STRUCTURE is an ubiquitous feature of many population genetic studies these days—if it is appropriate is another question. Today, while covering model based clustering in population genetics, we ran into a problem where STRUCTURE was unable to run and the OS said it was Corrupted and should be thrown away. Jump below for our fix, it really is an easy one.

Buffers &#038; 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.

A quick GGMap Tutorial

Applied Population Genetics Textbook Release

I will be posting portions of all 10 chapters of my upcoming textbook, Applied Population Genetics, as early draft chapters to this website over the spring semester.

Merging data frames

In R, there is often the need to merge two data.frame objects (say one with individual samples and the other with population coordinates. The merge() function is a pretty awesome though it may take a little getting used to. Here are some things to remember: You need to have two data.frame objects to merge The first one in the function call will be the one merged _on-to _the second one is added to the first. Each will need a column to use as an index—it is a column that will be used to match rows of data. If they are the same column names then the function will do it automagically, if no common names are found in the names() of either data.frame objects, you can specify the columns using the optional by.x= and by.y= function arguments.