Determines the sequence of analyses using either instrument timestamps, the order in the imported raw data file, or the order defined in the Analysis metadata. Note: After changing the analysis order, all post processing steps must be rerun.
Usage
set_analysis_order(
data = NULL,
order_by = c("timestamp", "resultfile", "metadata")
)
Examples
file_path <- system.file("extdata", "MRMkit_demo.tsv", package = "midar")
mexp <- MidarExperiment()
mexp <- import_data_mrmkit(mexp, path = file_path, import_metadata = TRUE)
#> ✔ Imported 499 analyses with 28 features
#> ℹ `feature_area` selected as default feature intensity. Modify with `set_intensity_var()`.
#> ✔ Analysis metadata associated with 499 analyses.
#> ✔ Feature metadata associated with 28 features.
# Order by timestamp (if available)
mexp <- set_analysis_order(mexp, "timestamp")
#> ✔ Analysis order set to "timestamp"
# Order by metadata definition
mexp <- set_analysis_order(mexp, "metadata")
#> ✔ Analysis order set to "metadata"