voids | R Documentation |
Voids are two-dimensional cycles and should be thought of as the topological equivalents of (the surface) of a sphere. These are typically displayed as a point cloud in space, with wire-frame edges outlining the component (triangular) simplices.
voidPlot(cycle, view, feature = NULL, radius = 0.01, ...)
voidFeature(feature, view, radius = 0.01, ...)
cycle |
An object of the |
view |
A matrix (with three columns, x, y, and, z) specifying the coordinates to be used to display the data. |
feature |
An object of the |
radius |
The radius of spheres used to display the points in three dimensions. |
... |
Additional graphical parameters. |
The 3D displays are implemented using the rgl
package. The voidPlot
function adds a wire-frame two-cycle
to the 3d scatter plot of the underlying data. If a feature is
present, then the point are colored by the expression lecvel of that
feature. If not present, they are simply colored gray. However, you can
always add the expression levels of a feature to an existing plot
using the voidFeature
function.
In an interactive session, everything is displayed in an OpenGL window,
where the graph can be manipulated with a mouse. Programmatically, you
can use the rgl::rglwidget
function to write out the code for
an interactive HTML display, and you can save the widget to a file
using the htmlwidgets::saveWidget
function.
Both voidPlot
and voidFeature
invisibly return their
first argument.
Kevin R. Coombes <krc@silicovore.com>
data(CLL)
featRai <- Feature(clinical[,"CatRAI"], "Rai Stage", c("green", "magenta"), c("High", "Low"))
vd <- Cycle(ripdiag, 2, 95, "blue")
mds <- cmdscale(daisydist, k = 3)
voidPlot(vd, mds)
voidFeature(featRai, mds, radius = 0.011)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.