plot_red: Plots a geometric visualization of the given k-cone reduced...

Description Usage Arguments Details Value See Also Examples

View source: R/kcone.R

Description

Plotting the reduced k-cone is a two step procedure. Where the k-cones are first projected into the two most informative dimensions by PCA. In case the basis is very large this is followed by clustering of the basis vectors to reduce overlap in the projection. In the plot, arrows denote the basis vectors, or 'extreme rays' of the respective k-cones and the shaded area denotes the interior of the k-cone into which all feasible k vectors must fall.

Usage

1
2
plot_red(basis_list, arrows = TRUE, col = NULL, n_cl = NULL,
  r_names = NULL)

Arguments

basis_list

A list of basis to be reduced.

arrows

Whether to draw the individual basis vectors or just the interior of the cone.

col

If NULL colors are automatically generated from a green to red palette. If not NULL must be of the same length as basis_list and denotes the colors used to draw the individual basis.

n_cl

The numbers of clusters to be used. If there are more than 1000 basis vectors per basis, clustering is always performed since calculation of the convex hull (interior area of the cone) is extremely lengthy otherwise.

r_names

Optional vector of names for the reactions (rows of the basis). If given those will be used to annotate the axes with the names of the six reactions carrying the largest absolute loadings in the respective principal component.

Details

Due to the dimension reduction and clustering plot_red is not a fast function and plotting might take a few minutes for large cones.

Value

Nothing. Just plots :O

See Also

plot_basis for heatmap of the basis.

Examples

1
2
3
4
S <- matrix(c(1,0,0,1,-1,0, 0, -1), nrow=2)
rownames(S) <- c('A', 'B')
V <- polytope_basis(S)
plot_red(list(V)) # A single basis is fine as long as it is a list

cdiener/dycone documentation built on Sept. 26, 2017, 9:11 p.m.