plotLong {timeOmics} | R Documentation

## Plot Longitudinal Profiles by Cluster

### Description

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

### Usage

    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)

### 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

### 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

    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)

[Package timeOmics version 1.0.1 Index]