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

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/princomp.R

Description

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

Usage

1
2
3
## S3 method for class '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)

Details

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

Value

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

Note

The function princomp() is declared S3 generic in the base package stats. The method documented here does not apply any existing methods, however, but rather relies on entirely different libraries for computation and graphical rendering. See references below.

Author(s)

Daniel T. Braithwaite and Kevin P. Keegan

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
####  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))

MG-RAST/matR documentation built on May 7, 2018, 9:44 p.m.