Learn R Programming

matR (version 0.9.1)

princomp.biom: Compute and plot principal coordinates of BIOM data

Description

Compute principal coordinates of a biom object (columnwise), and plot selected coordinates.

Usage

# S3 method for biom
princomp(x, method="euclidean", dim=1:3, ..., 
  map=NULL, rows=TRUE, columns=TRUE, rerender=NULL)

Arguments

x

an object (biom)

method

name of distance or dissimilarity measure (character)

dim

which principal coordinates to plot (integer)

arguments to scatterplot3d(), points(), or text()

map

assignment of par variables to metadata (character)

rows

subselection of rows (integer, character, or logical)

columns

subselection of columns (integer, character, or logical)

rerender

previous computation to reuse in this call (pco or dist)

Value

Complete technical documentation is forthcoming. For the current preliminary release, please refer to the examples provided.

Details

Complete technical documentation is forthcoming. For the current preliminary release, please refer to the examples provided.

See Also

ecodist::pco, scatterplot3d::scatterplot3d, graphics::points, graphics::text, distx, BIOM.utils::biom

Examples

Run this code
# NOT RUN {
####  quick two or three dimensional plots with choice of dissimilarity measure
princomp (xx1)
princomp (xx1, dim=2:3, method="bray-curtis")

####  graphical tweaks incorporating metadata
columns (xx1, "host_common_name|samp_store_temp")
princomp (xx1, dim=1:2, map=c(col="host_common_name", pch="samp_store_temp"),
  col=c(Mouse="brown", cow="red", "striped bass"="blue"),
  pch=c("-80"="+","NA"="*"), cex=2, label.pos=c(4,4,2,2,2,2,4), label.font=3)

####  transformed data, labeling from metadata, and modified perspective
columns (xx2, "material")
princomp (transform (xx2, t_Log), map=c(col="material"), labels="$$project.id", 
  angle=50, mar=c(1,1,0,0))
# }

Run the code above in your browser using DataLab