Blog Archives

Processing nested lists

April 28, 2011
By
Processing nested lists

So perhaps you have all figured this out already, but I was excited to figure out how to finally neatly get all the data frames, lists, vectors, etc. out of a nested list. It is as easy as nesting calls to the apply family of functions, in the case bel...

Read more »

Running Phylip’s contrast application for trait pairs from R

April 26, 2011
By
Running Phylip’s contrast application for trait pairs from R

Here is some code to run Phylip's contrast application from R and get the output within R to easily manipulate yourself. Importantly, the code is written specifically for trait pairs only as the regular expression work in the code specifically grabs da...

Read more »

Phylometa from R: Randomization via Tip Shuffle

April 16, 2011
By
Phylometa from R: Randomization via Tip Shuffle

I wrote earlier about some code I wrote for running Phylometa (software to do phylogenetic meta-analysis) from R.I have been concerned about what exactly is the right penalty for including phylogeny in a meta-analysis. E.g.: AIC is calculated from Q in...

Read more »

Adjust branch lengths with node ages: comparison of two methods

April 10, 2011
By
Adjust branch lengths with node ages: comparison of two methods

Here is an approach for comparing two methods of adjusting branch lengths on trees: bladj in the program Phylocom and a fxn written by Gene Hunt at the Smithsonian.Get the code and example files here: http://wp.me/PRT1F-2vGet phylocom here: http:/...

Read more »

Phylometa from R – UDPATE

April 1, 2011
By
Phylometa from R – UDPATE

A while back I posted some messy code to run Phylometa from R, especially useful for processing the output data from Phylometa which is not easily done. The code is still quite messy, but it should work now. I have run the code with tens of different d...

Read more »

basic ggplot2 network graphs – ver2

March 23, 2011
By
basic ggplot2 network graphs – ver2

I posted last week a simple function to plot networks using ggplot2 package. Here is version 2. I still need to work on figuring out efficient vertex placement.Changes in version 2:-You have one of three options: use an igraph object, a matrix, or a da...

Read more »

basic ggplot2 network graphs

March 17, 2011
By
basic ggplot2 network graphs

I have been looking around on the web and have not found anything yet related to using ggplot2 for making graphs/networks. I put together a few functions to make very simple graphs. The bipartite function especially is not ideal, as of course we only w...

Read more »

Five ways to visualize your pairwise comparisons

March 5, 2011
By
Five ways to visualize your pairwise comparisons

In data analysis it is often nice to look at all pairwise combinations of continuous variables in scatterplots. Up until recently, I have used the function splom in the package lattice, but ggplot2 has superior aesthetics, I think anyway.Here a fe...

Read more »

Phenotypic selection analysis in R

February 24, 2011
By
Phenotypic selection analysis in R

I have up to recently always done my phenotypic selection analyses in SAS. I finally got some code I think works to do everything SAS would do. Feedback much appreciated!########################Selection analyses#############################install.pac...

Read more »

Troubling news for the teaching of evolution

February 9, 2011
By
Troubling news for the teaching of evolution

A recent survey reported in Science ("Defeating Creationism in the Courtroom, but not in the Classroom"),  suggests that high school teachers are not teaching evolution to the fullest extent, say, that grammar is being taught in the English c...

Read more »