Learn R Programming

ClusterSignificance (version 1.0.3)

Pcp-class: projection of points into one dimension

Description

project points onto a principal curve

Usage

getData(x, ...)
"getData"(x, n = NULL)
"initialize"(.Object, ..., groups, points.orig, line, points.onedim, index)
"plot"(x, y, steps = "all", ...)
pcp(mat, ...)
"pcp"(mat, groups, ...)
"show"(object)

Arguments

x
matrix object for the function pcp otherwise it is a Pcp object
...
additional arguments to pass on
n
data to extract from Pcp (NULL gives all)
.Object
internal object
groups
vector in same order as rows in matrix
points.orig
multidimensional points describing the original data
line
multidimensional points describing a line
points.onedim
a vector of points
index
internal index from the projection
y
default plot param, which should be set to NULL
steps
1,2,3,4,5,6 or "all"
mat
matrix with samples on rows, PCs in columns. Ordered PCs, with PC1 to the left.
object
Pcp object

Value

The pcp function returns an object of class Pcp

Details

The resulting Pcp object containing results from a principal curve reduction to one dimension. The group and the one dimensional points will be the information needed to carry out a classification using the classify() function. But as a help to illustrate the details of the dimension reduction , the information from some critical steps are stored in the object. To visually explore these there is a dedicated plot method for Php objects, use plot().

Examples

Run this code

#use demo data
data(pcpMatrix)
groups <- rownames(pcpMatrix)

#run function
prj <- pcp(pcpMatrix, groups)

#getData accessor
getData(prj)

#getData accessor specific
getData(prj, "line")

#plot the result (if dim >2, then plot in 3d)
plot(prj)

#plot the result (if dim =2, then plot in 2d)
prj2 <- pcp(pcpMatrix[,1:2], groups)
plot(prj2)

Run the code above in your browser using DataLab