plotLong: Plot Longitudinal Profiles by Cluster

Description Usage Arguments Value See Also Examples

View source: R/plotLong.R

Description

This function provides a expression profile representation over time and by cluster.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plotLong(
  object,
  time = NULL,
  plot = TRUE,
  center = TRUE,
  scale = TRUE,
  title = "Time-course Expression",
  X.label = NULL,
  Y.label = NULL,
  legend = FALSE,
  legend.title = NULL,
  legend.block.name = NULL
)

Arguments

object

a mixOmics result of class (s)pca, (s)pls, block.(s)pls.

time

(optional) a numeric vector, the same size as ncol(X), to change the time scale.

plot

a logical, if TRUE then a plot is produced. Otherwise, the data.frame on which the plot is based on is returned.

center

a logical value indicating whether the variables should be shifted to be zero centered.

scale

a logical value indicating whether the variables should be scaled to have unit variance before the analysis takes place.

title

character indicating the title plot.

X.label

x axis titles.

Y.label

y axis titles.

legend

a logical, to display or not the legend.

legend.title

if legend is provided, title of the legend.

legend.block.name

a character vector corresponding to the size of the number of blocks in the mixOmics object.

Value

a data.frame (gathered form) containing the following columns:

time

x axis values

molecule

names of features

value

y axis values

cluster

assigned clusters

block

name of 'blocks'

See Also

getCluster

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
demo <- suppressWarnings(get_demo_cluster())
X <- demo$X
Y <- demo$Y
Z <- demo$Z

# (s)pca
pca.res <- mixOmics::pca(X, ncomp = 3)
plotLong(pca.res)
spca.res <- mixOmics::spca(X, ncomp =2, keepX = c(15, 10))
plotLong(spca.res)

# (s)pls
pls.res <- mixOmics::pls(X,Y)
plotLong(pls.res)
spls.res <- mixOmics::spls(X,Y, keepX = c(15,10), keepY=c(5,6))
plotLong(spls.res)

# (s)block.spls
block.pls.res <- mixOmics::block.pls(X=list(X=X,Z=Z), Y=Y)
plotLong(block.pls.res)
block.spls.res <- mixOmics::block.spls(X=list(X=X,Z=Z), Y=Y, 
                             keepX = list(X = c(15,10), Z = c(5,6)), 
                             keepY = c(3,6))
plotLong(block.spls.res)

abodein/timeOmics_BioC documentation built on April 25, 2021, 5:23 p.m.