batch_cor | R Documentation |
Performs a batch correlation analysis between a target variable and multiple feature variables in a dataset. This function allows for the selection of the correlation method and applies corrections for multiple testing.
batch_cor(data, target, feature, method = "spearman")
data |
A data frame containing the dataset with both target and feature variables. |
target |
A character string specifying the name of the target variable within the dataset. |
feature |
A character vector specifying the names of the feature variables to be analyzed. |
method |
A character string specifying the correlation method to be used; default is "spearman". |
Returns a tibble containing the feature names, p-values, correlation coefficients, adjusted p-values, log-transformed p-values, and significance stars based on p-value thresholds.
Dongqiang Zeng
# Load TCGA-STAD microenvironment signature data
data("sig_stad", package = "IOBR")
# Conduct correlation analysis
results <- batch_cor(data = sig_stad, target = "CD_8_T_effector", feature = colnames(sig_stad)[69:ncol(sig_stad)])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.