# Read a toy dataset in the format produced with Bruker MetaboScape (Version 2021).
featuretable_path <- system.file("extdata", "toy_metaboscape.csv", package = "metamorphr")
# Example 1: Provide indices for metadata_cols
featuretable <- read_featuretable(featuretable_path, metadata_cols = 2:5)
featuretable
# Example 2: Provide a name for label_col and indices for metadata_cols
featuretable <- read_featuretable(
featuretable_path,
label_col = "m/z",
metadata_cols = c(1, 2, 4, 5)
)
featuretable
# Example 3: Provide names for both, label_col and metadata_cols
featuretable <- read_featuretable(
featuretable_path,
label_col = "m/z",
metadata_cols = c("Bucket label", "RT", "Name", "Formula")
)
featuretable
Run the code above in your browser using DataLab