Last data update: 2014.03.03

R: Plot an MDS Plot of a Group of Trees
plotTreeDataMDSR Documentation

Plot an MDS Plot of a Group of Trees

Description

This function can take any number of data sets and plots them on an MDS plot to show relative closeness to one another.

Usage

	plotTreeDataMDS(data, main = "Tree MDS Comparisons", calcMLE = TRUE, mleTitles, 
		dotColors = c("red", "orange", "blue", "green", "yellow", "purple"), 
		dotSizes = c(1, 2), showNames = FALSE, returnCoords = FALSE)

Arguments

data

A single data frame or a list of a data frames in which each column contains the rdp read counts for every taxa given in the row names.

main

A title for the MDS plot.

calcMLE

If 'FALSE' the MLEs for the data sets will not be calculated and plotted.

mleTitles

A vector of labels for each MLE data point on the MDS plot.

dotColors

The colors to be used when plotting the points and/or MLE points on the MDS plot. (See Notes in Details)

dotSizes

A vector in which the first value is the data points CEX and the second value is the MLEs CEX.

showNames

When 'TRUE' the column name will be plotted above each corresponding point.

returnCoords

When 'TRUE' this function will return the x and y coordinates for every plotted point.

Details

Notes:

  1. If the length of dot colors is at least twice the length of data, the colors will correspond in the following manner: (data 1's points, data 1's MLE, data 2's points, data 2's MLE, etc)

  2. If the length of dot colors is less than twice the length of data, the colors will correspond in the following manner: (data 1's points & data 1's MLE, data 2's points & data 2's MLE, etc)

  3. If the length of dot colors is less than the length of data, dotColors will be set by the rainbow function and the colors will correspond as above

Value

A MDS plot of the data.

Author(s)

Berkley Shands, Patricio S. La Rosa, Elena Deych, William D. Shannon

Examples

	data(saliva)
	data(stool)
	
	plotTreeDataMDS(list(saliva, stool), mleTitles=c("Saliva", "Stool"))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(HMPTrees)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/HMPTrees/plotTreeDataMDS.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotTreeDataMDS
> ### Title: Plot an MDS Plot of a Group of Trees
> ### Aliases: plotTreeDataMDS
> 
> ### ** Examples
> 
> 	data(saliva)
> 	data(stool)
> 	
> 	plotTreeDataMDS(list(saliva, stool), mleTitles=c("Saliva", "Stool"))
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>