Skip to contents

Get and set the name of special column for subject identifiers

Usage

subject_col(object)

subject_col(object) <- value

Arguments

object

a MetaboSet object

value

string, name of column to be designated for holding subject identifiers

Value

Character, the name of the subject variable.

For the endomorphism, an object with the subject variable set to the specified variable.

Examples

data(example_set)
ex_set <- as(example_set, "MetaboSet")
#> INFO [2025-06-23 22:38:31] 
#> Checking feature information
#> INFO [2025-06-23 22:38:31] Checking that feature IDs are unique and not storedas numbers
#> INFO [2025-06-23 22:38:31] Checking that feature data includes a 'Split' column
#> INFO [2025-06-23 22:38:31] Checking that feature data includes a 'Flag' column
#> INFO [2025-06-23 22:38:31] Checking that feature abundances only contain numeric values
#> INFO [2025-06-23 22:38:31] Setting row and column names of exprs based on feature and pheno data
# Get name of subject variable
subject_col(ex_set)
#> [1] NA
data(example_set)
ex_set <- as(example_set, "MetaboSet")
#> INFO [2025-06-23 22:38:31] 
#> Checking feature information
#> INFO [2025-06-23 22:38:31] Checking that feature IDs are unique and not storedas numbers
#> INFO [2025-06-23 22:38:31] Checking that feature data includes a 'Split' column
#> INFO [2025-06-23 22:38:31] Checking that feature data includes a 'Flag' column
#> INFO [2025-06-23 22:38:31] Checking that feature abundances only contain numeric values
#> INFO [2025-06-23 22:38:31] Setting row and column names of exprs based on feature and pheno data
# Set subject variable
subject_col(ex_set) <- "Subject_ID"