Feature-class {RPointCloud} | R Documentation |
Feature
Objects For Visualizing Topological Data Anal;ysis Results
Description
The Feature
object represents a feature from a data matrix used
when performing topological data analysis with the TDA
package. Features might be genes, proteins, clinical or demographic
covariates, or any other item measured on a set of patient samples or
cells.
Usage
Feature(values, name, colors, meaning, ...)
## S4 method for signature 'Feature,matrix'
plot(x, y, pch = 16, ...)
## S4 method for signature 'Feature'
points(x, view, ...)
Arguments
values |
A numeric vector. |
name |
A character vector of length one. |
colors |
A character vector of length at least two, containing the names or hexadecimal representations of colors used to create a color ramp to display the feature. |
meaning |
A character vector of length two containing the interpretations of the low and high extreme values of the feature. Note that this works perfectly well for binary factors represented as numeric 0-1 vectors. |
x |
A |
y |
A (layout) matrix with coordinates showing where to plot each point in the feature. |
view |
A (layout) matrix with coordinates showing where to plot each point in the feature. |
pch |
A number; the graphical plotting character parameter |
... |
The usual set of additional graphical parameters. |
Value
The Feature
function constructs and returns an object of the
Feature
class
The plot
and points
methods return (invisibly) the Feature
object that was their first argument.
Slots
name
:A character vector of length one; the name of the feature..
values
:A numeric vector of the values of this feature.
meaning
:A character vector of length two containing the interpretations of the low and high extreme values of the feature. Note that this works perfectly well for binary factors represented as numeric 0-1 vectors.
colRamp
:A function created using the
colorRamp2
function from thecirclize
package.
Methods
- plot(x, y, lwd = 2, ...):
-
Produce a plot of a
Feature
object. - points(x, view, ...)
-
Add a depiction of a feature to an existing plot.
Author(s)
Kevin R. Coombes <krc@silicovore.com>
Examples
data(CLL)
featSex <- Feature(clinical[,"Sex"], "Sex",
c("pink", "skyblue"), c("Female", "Male"))
V <- cmdscale(daisydist)
plot(featSex, V)
plot(V)
points(featSex, V)