File: LEM-combine.Rd

package info (click to toggle)
r-bioc-singlecellexperiment 1.28.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 640 kB
  • sloc: makefile: 2
file content (50 lines) | stat: -rw-r--r-- 1,824 bytes parent folder | download | duplicates (3)
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
41
42
43
44
45
46
47
48
49
50
\name{Combining LEMs}

\alias{rbind,LinearEmbeddingMatrix-method}
\alias{cbind,LinearEmbeddingMatrix-method}

\title{LEM combining methods}

\description{
Methods to combine LinearEmbeddingMatrix objects.
}

\usage{
\S4method{rbind}{LinearEmbeddingMatrix}(..., deparse.level=1)

\S4method{cbind}{LinearEmbeddingMatrix}(..., deparse.level=1)
}

\arguments{
\item{...}{One or more LinearEmbeddingMatrix objects.}
\item{deparse.level}{An integer scalar; see \code{?base::\link[base]{cbind}} for a description of this argument.}
}

\details{
For \code{rbind}, LinearEmbeddingMatrix objects are combined row-wise, i.e., rows in successive objects are appended to the first object.
This corresponds to adding more samples to the first object.
Note that \code{featureLoadings} and \code{factorData} will only be taken from the first element in the list;
no checks are performed to determine whether they are consistent or not across objects.

For \code{cbind}, LinearEmbeddingMatrix objects are combined columns-wise, i.e., columns in successive objects are appended to the first object.
This corresponds to adding more factors to the first object.
\code{featureLoadings} will also be combined column-wise across objects, provided that the number of features is the same across objects.
Similarly, \code{factorData} will be combined row-wise across objects.

Combining objects with and without row names will result in the removal of all row names; similarly for column names.
Duplicate row names are currently supported by duplicate column names are not, and will be de-duplicated appropriately.
}

\value{
A LinearEmbeddingMatrix object containing all rows/columns of the supplied objects.
}

\author{
Aaron Lun
}

\examples{
example(LinearEmbeddingMatrix, echo=FALSE) # using the class example
rbind(lem, lem)
cbind(lem, lem)
}