|
a |
|
b/man/plotLong.Rd |
|
|
1 |
% Generated by roxygen2: do not edit by hand |
|
|
2 |
% Please edit documentation in R/plotLong.R |
|
|
3 |
\name{plotLong} |
|
|
4 |
\alias{plotLong} |
|
|
5 |
\title{Plot Longitudinal Profiles by Cluster} |
|
|
6 |
\usage{ |
|
|
7 |
plotLong( |
|
|
8 |
object, |
|
|
9 |
time = NULL, |
|
|
10 |
plot = TRUE, |
|
|
11 |
center = TRUE, |
|
|
12 |
scale = TRUE, |
|
|
13 |
title = "Time-course Expression", |
|
|
14 |
X.label = NULL, |
|
|
15 |
Y.label = NULL, |
|
|
16 |
legend = FALSE, |
|
|
17 |
legend.title = NULL, |
|
|
18 |
legend.block.name = NULL |
|
|
19 |
) |
|
|
20 |
} |
|
|
21 |
\arguments{ |
|
|
22 |
\item{object}{a mixOmics result of class (s)pca, (s)pls, block.(s)pls.} |
|
|
23 |
|
|
|
24 |
\item{time}{(optional) a numeric vector, the same size as \code{ncol(X)}, to change the time scale.} |
|
|
25 |
|
|
|
26 |
\item{plot}{a logical, if TRUE then a plot is produced. Otherwise, the data.frame on which the plot is based on is returned.} |
|
|
27 |
|
|
|
28 |
\item{center}{a logical value indicating whether the variables should be shifted to be zero centered.} |
|
|
29 |
|
|
|
30 |
\item{scale}{a logical value indicating whether the variables should be scaled to have unit variance before the analysis takes place.} |
|
|
31 |
|
|
|
32 |
\item{title}{character indicating the title plot.} |
|
|
33 |
|
|
|
34 |
\item{X.label}{x axis titles.} |
|
|
35 |
|
|
|
36 |
\item{Y.label}{y axis titles.} |
|
|
37 |
|
|
|
38 |
\item{legend}{a logical, to display or not the legend.} |
|
|
39 |
|
|
|
40 |
\item{legend.title}{if \code{legend} is provided, title of the legend.} |
|
|
41 |
|
|
|
42 |
\item{legend.block.name}{a character vector corresponding to the size of the number of blocks in the mixOmics object.} |
|
|
43 |
} |
|
|
44 |
\value{ |
|
|
45 |
a data.frame (gathered form) containing the following columns: |
|
|
46 |
\item{time}{x axis values} |
|
|
47 |
\item{molecule}{names of features} |
|
|
48 |
\item{value}{y axis values} |
|
|
49 |
\item{cluster}{assigned clusters} |
|
|
50 |
\item{block}{name of 'blocks'} |
|
|
51 |
} |
|
|
52 |
\description{ |
|
|
53 |
This function provides a expression profile representation over time and by cluster. |
|
|
54 |
} |
|
|
55 |
\examples{ |
|
|
56 |
demo <- suppressWarnings(get_demo_cluster()) |
|
|
57 |
X <- demo$X |
|
|
58 |
Y <- demo$Y |
|
|
59 |
Z <- demo$Z |
|
|
60 |
|
|
|
61 |
# (s)pca |
|
|
62 |
pca.res <- mixOmics::pca(X, ncomp = 3) |
|
|
63 |
plotLong(pca.res) |
|
|
64 |
spca.res <- mixOmics::spca(X, ncomp =2, keepX = c(15, 10)) |
|
|
65 |
plotLong(spca.res) |
|
|
66 |
|
|
|
67 |
# (s)pls |
|
|
68 |
pls.res <- mixOmics::pls(X,Y) |
|
|
69 |
plotLong(pls.res) |
|
|
70 |
spls.res <- mixOmics::spls(X,Y, keepX = c(15,10), keepY=c(5,6)) |
|
|
71 |
plotLong(spls.res) |
|
|
72 |
|
|
|
73 |
# (s)block.spls |
|
|
74 |
block.pls.res <- mixOmics::block.pls(X=list(X=X,Z=Z), Y=Y) |
|
|
75 |
plotLong(block.pls.res) |
|
|
76 |
block.spls.res <- mixOmics::block.spls(X=list(X=X,Z=Z), Y=Y, |
|
|
77 |
keepX = list(X = c(15,10), Z = c(5,6)), |
|
|
78 |
keepY = c(3,6)) |
|
|
79 |
plotLong(block.spls.res) |
|
|
80 |
|
|
|
81 |
|
|
|
82 |
} |
|
|
83 |
\seealso{ |
|
|
84 |
\code{\link[timeOmics]{getCluster}} |
|
|
85 |
} |