Check data–metadata alignment consistency
check_data_metadata_match.RdA lightweight check to verify that the columns in a data matrix and
the rows in the corresponding metadata frame refer to the same samples.
Typically used after importing data but before building a DAList.
Value
Invisibly returns TRUE if the match is valid. Stops with an informative error if there are missing or mismatched samples.
Examples
if (FALSE) { # \dontrun{
dat <- data.frame(S1 = 1:3, S2 = 4:6)
meta <- data.frame(group = c("A", "B"), row.names = c("S1", "S2"))
check_data_metadata_match(dat, meta) # passes
bad_meta <- data.frame(group = c("A", "B"), row.names = c("S1", "S3"))
check_data_metadata_match(dat, bad_meta) # stops with descriptive error
} # }