Feature
Objects For Visualizing Topological Data Anal;ysis ResultsThe 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.
Feature(values, name, colors, meaning, ...)
# S4 method for Feature,matrix
plot(x, y, pch = 16, ...)
# S4 method for Feature
points(x, view, ...)
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.
A numeric vector.
A character vector of length one.
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.
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.
A Feature
object.
A (layout) matrix with coordinates showing where to plot each point in the feature.
A (layout) matrix with coordinates showing where to plot each point in the feature.
A number; the graphical plotting character parameter pch
.
The usual set of additional graphical parameters.
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 the circlize
package.
Produce a plot of a Feature
object.
Add a depiction of a feature to an existing plot.
Kevin R. Coombes <krc@silicovore.com>
data(CLL)
featSex <- Feature(clinical[,"Sex"], "Sex",
c("pink", "skyblue"), c("Female", "Male"))
V <- cmdscale(daisydist)
plot(featSex, V)
plot(V)
points(featSex, V)
Run the code above in your browser using DataLab