svd.radial: Visualizing Singular Vectors or Principal Components by...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/svdvis.R

Description

Creates a Radial Coordinates Plot from selected singular vectors or principal components. Principal components can be plotted by setting weights = "sv". It uses the radviz function, optional arguments for radviz can be specified.

Usage

1
2
svd.radial(svd.obj, r = NULL, weights = NULL, group = NULL, alpha = 1,
  ...)

Arguments

svd.obj

A list, resulted from applying svd to a dataset, with u, d, and v corresponding to left singular vector, singular values, and right singular vectors, respectively. Alternatively, supply singular vectors, v.

r

A positive integer to use only the first r vectors in visualization. If not specified, all vectors available in svd.obj$v are visualized.

weights

A vector of length r. If "sv", singular values contained in svd.obj$d[1:r] are used.

group

A vector of length n, specifying groups (e.g., phenotypes or conditions for n samples).

alpha

A numeric value for transparency.

...

Additional arguments to pass onto radviz.

Value

svd.radial creates and draws a figure, which is a ggplot object.

Author(s)

Neo Christopher Chung [email protected]

See Also

radviz

Examples

1
2
3
4
5
6
set.seed(1234)
dat = matrix(rnorm(1000), 100, 10)
svd.obj = svd(dat)
colnames(svd.obj$v) = paste0("V",1:10)
rownames(svd.obj$v) = paste0("Sample",1:10)
svd.radial(dat, group=c(rep("Group1",5), rep("Group2",5)))

svdvis documentation built on May 29, 2017, 3:25 p.m.