% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/batch_cor.R
\name{batch_cor}
\alias{batch_cor}
\title{Batch Correlation Analysis}
\usage{
batch_cor(data, target, feature, method = c("spearman", "pearson", "kendall"))
}
\arguments{
\item{data}{Data frame containing the target and feature variables.}

\item{target}{Character string specifying the name of the target variable.}

\item{feature}{Character vector specifying the names of feature variables to
correlate with the target.}

\item{method}{Character string specifying the correlation method. Options are
`"spearman"`, `"pearson"`, or `"kendall"`. Default is `"spearman"`.}
}
\value{
Tibble containing the following columns for each feature:
\describe{
  \item{sig_names}{Feature name}
  \item{p.value}{Raw p-value}
  \item{statistic}{Correlation coefficient}
  \item{p.adj}{Adjusted p-value (Benjamini-Hochberg)}
  \item{log10pvalue}{Negative log10-transformed p-value}
  \item{stars}{Significance stars: **** p<0.0001, *** p<0.001,
    ** p<0.01, * p<0.05, + p<0.5}
}
}
\description{
Performs correlation analysis between a target variable and multiple feature
variables. Computes correlation coefficients, p-values, and adjusts for
multiple testing using the Benjamini-Hochberg method.
}
\examples{
# Create a small example dataset
set.seed(123)
data_df <- as.data.frame(matrix(runif(100 * 10), 100, 10))
colnames(data_df) <- paste0("Signature", 1:10)

# Perform batch correlation
results <- batch_cor(
  data = data_df,
  target = "Signature1",
  feature = colnames(data_df)[2:10]
)
head(results)
}
\author{
Dongqiang Zeng
}
