Description Usage Arguments Value Author(s) Examples
Highlights a set of features of interest given as a
FeaturesOfInterest
instance on a PCA plot produced by
codeplot2D or plot3D
. If none of the features of interest
are found in the MSnset
's featureNames
, an warning
is thrown.
1 2 3 4 | highlightOnPlot(object, foi, labels, args = list(), ...)
highlightOnPlot3D(object, foi, labels, args = list(), radius = 0.1 * 3,
...)
|
object |
The main dataset described as an |
foi |
An instance of |
labels |
A |
args |
A named list of arguments to be passed to
|
... |
Additional parameters passed to |
radius |
Radius of the spheres to be added to the
visualisation produced by |
NULL; used for its side effects.
Laurent Gatto
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | library("pRolocdata")
data("tan2009r1")
x <- FeaturesOfInterest(description = "A test set of features of interest",
fnames = featureNames(tan2009r1)[1:10],
object = tan2009r1)
## using FeaturesOfInterest or feature names
par(mfrow = c(2, 1))
plot2D(tan2009r1)
highlightOnPlot(tan2009r1, x)
plot2D(tan2009r1)
highlightOnPlot(tan2009r1, featureNames(tan2009r1)[1:10])
.pca <- plot2D(tan2009r1)
head(.pca)
highlightOnPlot(.pca, x, col = "red")
highlightOnPlot(tan2009r1, x, col = "red", cex = 1.5)
highlightOnPlot(tan2009r1, x, labels = TRUE)
.pca <- plot2D(tan2009r1, dims = c(1, 3))
highlightOnPlot(.pca, x, pch = "+", dims = c(1, 3))
highlightOnPlot(tan2009r1, x, args = list(dims = c(1, 3)))
.pca2 <- plot2D(tan2009r1, mirrorX = TRUE, dims = c(1, 3))
## previous pca matrix, need to mirror X axis
highlightOnPlot(.pca, x, pch = "+", args = list(mirrorX = TRUE))
## new pca matrix, with X mirrors (and 1st and 3rd PCs)
highlightOnPlot(.pca2, x, col = "red")
plot2D(tan2009r1)
highlightOnPlot(tan2009r1, x)
highlightOnPlot(tan2009r1, x, labels = TRUE, pos = 3)
highlightOnPlot(tan2009r1, x, labels = "Flybase.Symbol", pos = 1)
## in 3 dimensions
if (interactive()) {
plot3D(tan2009r1, radius1 = 0.05)
highlightOnPlot3D(tan2009r1, x, labels = TRUE)
highlightOnPlot3D(tan2009r1, x)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.