Join a new data frame of information to pheno data of a SummarizedExperiment object.
Usage
join_colData(object, dframe)
# S4 method for class 'SummarizedExperiment,data.frame'
join_colData(object, dframe)
Arguments
- object
a
SummarizedExperiment
object- dframe
a data frame with the new information
Examples
data(example_set)
new_info <- data.frame(
Sample_ID = colnames(example_set),
BMI = stats::runif(ncol(example_set), 22, 26)
)
with_new_info <- join_colData(example_set, new_info)
colnames(colData(with_new_info))
#> [1] "Sample_ID" "Injection_order" "Subject_ID"
#> [4] "Group" "QC" "Time"
#> [7] "Batch" "HILIC_neg_Datafile" "HILIC_pos_Datafile"
#> [10] "RP_neg_Datafile" "RP_pos_Datafile" "BMI"