Learn R Programming

Reol (version 1.55)

MatchHierPageToEOLdata: Match Data Functions

Description

These functions match hierarchy concept IDs with EOL page data and/or taxonomic tree tips.

Usage

MatchHierPageToEOLdata(MyHiers, EOLdata) MatchDataToTreeTips(Tree, Data)

Arguments

MyHiers
A vector of filenames for downloaded hierarchy pages or a list of XML data stored as an R object
EOLdata
Any output dataframe from Reol functions
Tree
Taxonomic tree in the class phylo
Data
Data output from one of the EOL or Hierarchy gathering functions

Value

MatchHierPageToEOLdata returns a data frame where each row is a taxonomic unit. This is especially helpful if you wish to plot EOL data on a taxonomic tree (see example), because it matches the hierarchy taxon names with the EOL data (since taxon names will not always match). MatchDataToTreeTips will match the tip labels on a tree with those from a data frame. It orders the data in the same way as is in the trees, so that you can plot data on a tree without distortion (either in number of data points, or in taxonomic name).

Examples

Run this code
	#plotting richness scores
	## Not run: data(MyEOLs)
# 	 library(ape)
#      data(MyHiers)
#      Tree <- MakeHierarchyTree(MyHiers, includeNodeLabels=FALSE)  
#      MyData <- MatchHierPageToEOLdata(MyHiers, GetRichnessScores(MyEOLs))
#      plot(Tree, label.offset=1, x.lim=10)
#      tiplabels(round(as.numeric(MyData[,3])), 1:6, col="Blue", frame="none",
# 		bg="clear",adj = -0.5)
#      title(main="Richness scores")
# 	## End(Not run)

Run the code above in your browser using DataLab