Learn R Programming

provenance (version 0.2)

getPCA: Principal Component Analysis

Description

Performs PCA of compositional data using a centred logratio distance

Usage

getPCA(x, ...)

Arguments

x
an object of class HMdata
...
optional arguments to R's princomp function

Value

  • an object of class PCA

Examples

Run this code
fname <- system.file("Major.csv",package="provenance")
Major <- read.HMdata(fname)
plot(getMDS(Major,classical=TRUE))
dev.new()
plot(getPCA(Major),asp=1)
print("This example demonstrates the equivalence of classical MDS and PCA")

Run the code above in your browser using DataLab