Blog Archives

A simple function for plotting phylogenies in ggplot2

May 17, 2011
By
A simple function for plotting phylogenies in ggplot2

I wrote a simple function for plotting a phylogeny in ggplot2. However, it only handles a 3 species tree right now, as I haven't figured out how to generalize the approach to N species.Any ideas on how to improve this?

Read more »

plyr’s idata.frame VS. data.frame

May 13, 2011
By
plyr’s idata.frame VS. data.frame

I had seen the function idata.frame in plyr before, but not really tested it. Here are a few comparisons of operations on normal data frames and immutable data frames. Immutable data frames don't work with the doBy package, but do work with aggregate i...

Read more »

Comparison of functions for comparative phylogenetics

May 11, 2011
By
Comparison of functions for comparative phylogenetics

With all the packages (and beta stage groups of functions) for comparative phylogenetics in R (tested here: picante, geiger, ape, motmot, Liam Revell's functions), I was simply interested in which functions to use in cases where multiple functions exis...

Read more »

Treebase trees from R

May 3, 2011
By
Treebase trees from R

Treebase is a great resource for phylogenetic trees, and has a nice interface for searching for certain types of trees. However, if you want to simply download a lot of trees for analyses (like that in Davies et al.), then you want to be able to access...

Read more »

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 »

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)