% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/merge_eset.R
\name{merge_eset}
\alias{merge_eset}
\title{Merge Expression Sets by Row Names}
\usage{
merge_eset(eset1, eset2, eset3 = NULL)
}
\arguments{
\item{eset1}{First expression set (matrix or data frame with row names).}

\item{eset2}{Second expression set (matrix or data frame with row names).}

\item{eset3}{Optional third expression set. Default is `NULL`.}
}
\value{
Merged expression set (data frame) with duplicates removed.
  Row names correspond to gene symbols.
}
\description{
Merges two or three expression sets (matrices or data frames) by row names
(gene symbols), removing duplicates. The function ensures common genes
across all input expression sets are retained.
}
\examples{
# Create mock expression sets with common genes
set.seed(123)
common_genes <- c("TP53", "BRCA1", "EGFR", "MYC")
eset1 <- matrix(rnorm(12),
  nrow = 4,
  dimnames = list(common_genes, paste0("S", 1:3))
)
eset2 <- matrix(rnorm(16),
  nrow = 4,
  dimnames = list(common_genes, paste0("S", 4:7))
)
# Merge two expression sets
merged_eset <- merge_eset(eset1, eset2)
print(dim(merged_eset))
}
\author{
Dongqiang Zeng
}
