Re: [R-sig-phylo] R help generating a heat map

2013-12-23 Thread Eduardo Ascarrunz
Hello everyone, Newbie here. I'm looking for a way to generate random trees of N tips, allowing multifurcations. My N would be 12, so it wouldn't be practical (nor possible) to work with all the possible trees (cf. allFurcTrees). I'd be happy with a set of 1000 trees, sampled equiprobably. I'd

Re: [R-sig-phylo] R help generating a heat map

2013-12-23 Thread Liam J. Revell
Hi Eduardo. You could try something like this: randomFurcTrees-function(n,N=1){ foo-function(n){ t-di2multi(rtree(n,br=sample(c(0,1), size=2*(n-2),replace=TRUE),rooted=FALSE)) t$edge.length-NULL t } trees-if(N1) replicate(N,foo(12),simplify=FALSE) else foo(n) if(N1)

Re: [R-sig-phylo] R help generating a heat map

2013-12-23 Thread Joe Felsenstein
One can sample from all possible rooted labeled histories by randomly bifurcating lineages, and at the end assigning the names randomly to the tips. Note that a labeled history is not the same as a tree topology. One can sample randomly from all topologies of rooted bifurcating trees with

[R-sig-phylo] R help generating a heat map

2013-12-19 Thread Samantha Hilber
Hi - I am trying to generate a heat map to visualize my data; and am having trouble. I think the issue is the format of my data. I need the Dec_Val to be the color on the heat map, and the other variables to be the X and Y (like OffAge and Brd_Sze). When i have tried to do this in the past