Description Usage Arguments Value Note Author(s) References See Also Examples
View source: R/BioGeoBEARS_basics_v1.R
The tipranges object, as read from a LAGRANGE/PHYLIP-style geography file, may not have the species names as the same order as they are in the tips of the tree. This function allows the user to reorder them to match the tree
1 |
tipranges |
An object of class
|
tr |
A |
tipranges
An object of class tipranges
Go BEARS!
Nicholas J. Matzke matzke@berkeley.edu
http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster https://code.google.com/p/lagrange/
Matzke_2012_IBS
ReeSmith2008
SmithRee2010_CPPversion
tipranges_to_area_strings
,
define_tipranges_object
,
save_tipranges_to_LagrangePHYLIP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | testval=1
# Get the example files directory
extdata_dir = np(system.file("extdata", package="BioGeoBEARS"))
# tmp hard code:
# extdata_dir = "/Dropbox/_njm/__packages/BioGeoBEARS_setup/inst/extdata/"
# Set the filename (Hawaiian Psychotria from Ree & Smith 2008)
trfn = np(paste(extdata_dir, "/Psychotria_5.2.newick", sep=""))
tr = read.tree(trfn)
fn = np(paste(extdata_dir, "/Psychotria_geog.data", sep=""))
tipranges1 = getranges_from_LagrangePHYLIP(lgdata_fn=fn)
tipranges1
# Reorder the tipranges object
tipranges2 = order_tipranges_by_tree_tips(tipranges1, tr)
tipranges2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.