Xianping Li A learner

Discriminant Analysis of Principal Components (DAPC)

DAPC

I should declare first that I am not good at molecular ecology. Recently I met a clustering issue which referred to amino acid sequences, and some newest papers point to using DAPC. It seems that DAPC becomes a standard method to define genetic clusters in this field (it can also be applied to other quantitative data). adegenet is a powerful package “devoted to the multivariate analysis of genetic markers data”. And I learn nearly everything from its tutorials hosted on GitHub.

Read more

R package - leaflet

Interactive map

It will be wonderful to draw interactive maps.

In some situations we can use the package leaflet (which is based on the open source JavaScript library leaflet) in R to do our visualizational tasks. There are some detailed tutorials about this package. This is the R package documentation maintained by RStudio, this is the official site of the JavaScript library leaflet, and this website provides many other useful widgets in R except leaflet.

Read more

R function - heatmap.2

Heat map

Heat map is a kind of representation method that uses colors (always gradients) to represent the values in a matrix. It is very useful to detect valuable patterns in (large) data sets (with many variables) quickly. See Wikipedia for details.

Read more

Test phylogenetic signal

Phylogenetic signal

Ecological traits of related species always tend to be more similar than species randomly drawn from the same phylogeny. This is called phlogenetic signal[1-3]. It is often interpreted as providing information about the evolutionary process, and is controlled as the statistical nonindependence among species trait values in ecological analysis. There are some posts about how to test phylogenetic signal in R, this, this and this. I would give another example which I was recently involved in.

Read more

Spatial Autocorrelation

Everything is related to everything else, but near things are more related than distant things.–Waldo Tobler[1]

What is Spatial Autocorrelation (SA)?

As the first law of geography, SA is a measurement of the degree of similarity between spatial objects. A dependency exists between values of a variable in proximal locations. There are three kinds of SA: positive, negative and random (zero) (Fig. 1).

Read more