This helper function adds the sample name as a column in the feature dataframe. It assumes that the sample name is embedded in the filename, and this function strips unnecessary parts of the filename.
Examples
if (FALSE) { # \dontrun{
sample_name <- "sample_001_fea_v2.csv"
feature_data <- data.frame(roi_number = 1:10, feature_value = rnorm(10))
result <- extract_features(sample_name, feature_data)
} # }